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

// src/atoms/typo.tsx
import { Text as RadixText } from "@radix-ui/themes";
import { useMemo, forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
var Typo = forwardRef(
  (props, ref) => {
    const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
    const radixSize = useMemo(() => {
      if (size !== void 0) return size;
      if (variant === void 0) return "2";
      return mapWithResponsive({
        value: variant,
        mapFn: (variantValue) => {
          switch (variantValue) {
            case "caption":
              return "1";
            case "subtitle":
              return "3";
            case "body":
            default:
              return "2";
          }
        }
      });
    }, [size, variant]);
    return /* @__PURE__ */ jsx(RadixText, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
  }
);
Typo.displayName = "Typo";

export {
  Typo
};
//# sourceMappingURL=chunk-PMJIFLDT.js.map