import {
  __objRest,
  __spreadProps,
  __spreadValues
} from "./chunk-CRTRMMJ7.js";

// src/atoms/badge.tsx
import {
  Badge as RadixBadge
} from "@radix-ui/themes";
import { useMemo, forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
var Badge = forwardRef(
  (props, ref) => {
    const _a = props, { size = "small", color = "accent" } = _a, rest = __objRest(_a, ["size", "color"]);
    const radixSize = useMemo(() => {
      switch (size) {
        case "small":
          return "1";
        case "medium":
          return "2";
        case "large":
          return "3";
        default:
          return "1";
      }
    }, [size]);
    const radixColor = useMemo(() => {
      switch (color) {
        case "error":
          return "red";
        case "neutral":
          return "gray";
        case "success":
          return "green";
        case "accent":
        default:
          return void 0;
      }
    }, [color]);
    return /* @__PURE__ */ jsx(RadixBadge, __spreadProps(__spreadValues({}, rest), { color: radixColor, ref, size: radixSize }));
  }
);
Badge.displayName = "Badge";

export {
  Badge
};
//# sourceMappingURL=chunk-U3BQT7ZO.js.map