import R from "../../../../@babel/runtime/helpers/esm/extends.mjs";
import k from "../../../../@babel/runtime/helpers/esm/slicedToArray.mjs";
import d from "../../../../@babel/runtime/helpers/esm/defineProperty.mjs";
import z from "../../../../@babel/runtime/helpers/esm/objectWithoutProperties.mjs";
import * as a from "react";
import A from "../../../../classnames/index.mjs";
import { blue as P } from "../../../colors/es/index.mjs";
import $ from "./Context.mjs";
import E from "./IconBase.mjs";
import { setTwoToneColor as f, getTwoToneColor as S } from "./twoTonePrimaryColor.mjs";
import { normalizeTwoToneColors as h } from "../utils.mjs";
var j = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
f(P.primary);
var t = /* @__PURE__ */ a.forwardRef(function(o, T) {
  var r, x = o.className, e = o.icon, p = o.spin, n = o.rotate, u = o.tabIndex, l = o.onClick, v = o.twoToneColor, w = z(o, j), c = a.useContext($), s = c.prefixCls, i = s === void 0 ? "anticon" : s, y = c.rootClassName, _ = A(y, i, (r = {}, d(r, "".concat(i, "-").concat(e.name), !!e.name), d(r, "".concat(i, "-spin"), !!p || e.name === "loading"), r), x), m = u;
  m === void 0 && l && (m = -1);
  var I = n ? {
    msTransform: "rotate(".concat(n, "deg)"),
    transform: "rotate(".concat(n, "deg)")
  } : void 0, N = h(v), C = k(N, 2), b = C[0], g = C[1];
  return /* @__PURE__ */ a.createElement("span", R({
    role: "img",
    "aria-label": e.name
  }, w, {
    ref: T,
    tabIndex: m,
    onClick: l,
    className: _
  }), /* @__PURE__ */ a.createElement(E, {
    icon: e,
    primaryColor: b,
    secondaryColor: g,
    style: I
  }));
});
t.displayName = "AntdIcon";
t.getTwoToneColor = S;
t.setTwoToneColor = f;
const M = t;
export {
  M as default
};
