"use strict";

// src/utils/convert-button-size.ts
var convertSizeStr = (size) => {
  switch (size) {
    case "small":
      return "1";
    case "medium":
      return "2";
    case "large":
      return "3";
    default:
      return "2";
  }
};
var convertSizeResponse = (size) => {
  if (typeof size === "string" || typeof size === "undefined") {
    return convertSizeStr(size);
  }
  const radixSize = {};
  let key = "initial";
  for (key in size) {
    radixSize[key] = convertSizeStr(size[key]);
  }
  return radixSize;
};

// src/test/button.test.ts
describe("convertSizeResponse", () => {
  test("converts size to radix size", () => {
    expect(convertSizeResponse("small")).toBe("1");
    expect(convertSizeResponse("medium")).toBe("2");
    expect(convertSizeResponse("large")).toBe("3");
  });
  test("converts size object to radix size object", () => {
    expect(
      convertSizeResponse({
        initial: "small",
        lg: "large",
        md: "medium",
        xl: "large",
        xs: "small"
      })
    ).toEqual({
      initial: "1",
      lg: "3",
      md: "2",
      xl: "3",
      xs: "1"
    });
  });
});
//# sourceMappingURL=button.test.cjs.map