import { jsx as u } from "react/jsx-runtime";
import X from "react";
import { d as b } from "./icon-utils-CmjSEuTl.js";
function h(...i) {
  return i.filter(Boolean).join(" ");
}
const x = "_icon_yamd4_2", k = "_iconXs_yamd4_20", M = "_iconSm_yamd4_25", D = "_iconMd_yamd4_30", L = "_iconLg_yamd4_35", P = "_iconXl_yamd4_40", T = "_iconPrimary_yamd4_46", $ = "_iconSecondary_yamd4_50", N = "_iconTertiary_yamd4_54", j = "_iconInverted_yamd4_58", w = "_iconInteractive_yamd4_63", B = "_iconDisabled_yamd4_76", n = {
  icon: x,
  iconXs: k,
  iconSm: M,
  iconMd: D,
  iconLg: L,
  iconXl: P,
  iconPrimary: T,
  iconSecondary: $,
  iconTertiary: N,
  iconInverted: j,
  iconInteractive: w,
  iconDisabled: B
}, C = X.forwardRef(({
  name: i,
  size: o = "md",
  tone: s = "primary",
  className: d,
  style: m,
  interactive: _ = !1,
  disabled: c = !1,
  "aria-label": e,
  "aria-hidden": y,
  ...l
}, v) => {
  const a = b(i), t = e !== void 0, I = y ?? !t, r = typeof o == "number", S = r ? { width: `${o}px`, height: `${o}px` } : void 0, p = r ? void 0 : {
    xs: n.iconXs,
    sm: n.iconSm,
    md: n.iconMd,
    lg: n.iconLg,
    xl: n.iconXl
  }[o], f = {
    primary: n.iconPrimary,
    secondary: n.iconSecondary,
    tertiary: n.iconTertiary,
    inverted: n.iconInverted
  }[s], g = {
    ...{
      WebkitMaskImage: `url(${a})`,
      maskImage: `url(${a})`
    },
    ...S,
    ...m
  };
  return /* @__PURE__ */ u(
    "span",
    {
      ref: v,
      role: t ? "img" : void 0,
      "aria-label": e,
      "aria-hidden": I || void 0,
      className: h(
        n.icon,
        p,
        f,
        _ && !c && n.iconInteractive,
        c && n.iconDisabled,
        d
      ),
      style: g,
      ...l
    }
  );
});
C.displayName = "Icon";
export {
  C as I,
  h as c
};
