"use client";
import { jsx as f } from "react/jsx-runtime";
import { forwardRef as p, useMemo as g } from "react";
import { c as b } from "./cn-ct4n7r74mh8y0f48.js";
const s = {
  variant: {
    heading1: {
      classes: "text-3xl font-semibold",
      description: "Large heading for page titles"
    },
    heading2: {
      classes: "text-2xl font-semibold",
      description: "Medium heading for section titles"
    },
    heading3: {
      classes: "text-lg font-semibold",
      description: "Small heading for subsections"
    },
    body: {
      classes: "text-kumo-default",
      description: "Default body text"
    },
    secondary: {
      classes: "text-kumo-subtle",
      description: "Muted text for secondary information"
    },
    success: {
      classes: "text-kumo-link",
      description: "Success state text"
    },
    error: {
      classes: "text-kumo-danger",
      description: "Error state text"
    },
    mono: {
      classes: "font-mono",
      description: "Monospace text for code"
    },
    "mono-secondary": {
      classes: "font-mono text-kumo-subtle",
      description: "Muted monospace text"
    }
  },
  size: {
    xs: {
      classes: "text-xs",
      description: "Extra small text"
    },
    sm: {
      classes: "text-sm",
      description: "Small text"
    },
    base: {
      classes: "text-base",
      description: "Default text size"
    },
    lg: {
      classes: "text-lg",
      description: "Large text"
    }
  }
};
function y({
  variant: e = "body",
  bold: i = !1,
  size: o = "base",
  truncate: c = !1,
  children: a,
  DANGEROUS_className: r,
  DANGEROUS_style: l,
  as: t,
  ...d
}, m) {
  const n = ["body", "secondary", "success", "error"].includes(e), u = ["mono", "mono-secondary"].includes(e), x = g(() => t || (["mono", "mono-secondary"].includes(e) || ["heading1", "heading2", "heading3"].includes(e) ? "span" : "p"), [e, t]);
  return /* @__PURE__ */ f(
    x,
    {
      ref: m,
      className: b(
        "text-kumo-default",
        s.variant[e].classes,
        n ? s.size[o].classes : "",
        n && i ? "font-medium" : "",
        // Monospace fonts need to be 1pt smaller than body text to optically match
        u && (o === "lg" ? s.size.base.classes : s.size.sm.classes),
        c && "truncate min-w-0",
        r
      ),
      style: l,
      ...d,
      children: a
    }
  );
}
const T = p(y);
export {
  T
};
//# sourceMappingURL=text-f7t467waymhb30sx.js.map
