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