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