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