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