import o from "../../../@babel/runtime/helpers/esm/objectSpread2.mjs";
import c from "../../../@babel/runtime/helpers/esm/typeof.mjs";
import "../../colors/es/index.mjs";
import { updateCSS as p } from "../../../rc-util/es/Dom/dynamicCSS.mjs";
import { getShadowRoot as g } from "../../../rc-util/es/Dom/shadow.mjs";
import { warningOnce as d } from "../../../rc-util/es/warning.mjs";
import s, { useContext as b, useEffect as y } from "react";
import h from "./components/Context.mjs";
import v from "../../colors/es/generate.mjs";
function x(n) {
  return n.replace(/-(.)/g, function(t, e) {
    return e.toUpperCase();
  });
}
function R(n, t) {
  d(n, "[@ant-design/icons] ".concat(t));
}
function O(n) {
  return c(n) === "object" && typeof n.name == "string" && typeof n.theme == "string" && (c(n.icon) === "object" || typeof n.icon == "function");
}
function l() {
  var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return Object.keys(n).reduce(function(t, e) {
    var i = n[e];
    switch (e) {
      case "class":
        t.className = i, delete t.class;
        break;
      default:
        delete t[e], t[x(e)] = i;
    }
    return t;
  }, {});
}
function f(n, t, e) {
  return e ? /* @__PURE__ */ s.createElement(n.tag, o(o({
    key: t
  }, l(n.attrs)), e), (n.children || []).map(function(i, r) {
    return f(i, "".concat(t, "-").concat(n.tag, "-").concat(r));
  })) : /* @__PURE__ */ s.createElement(n.tag, o({
    key: t
  }, l(n.attrs)), (n.children || []).map(function(i, r) {
    return f(i, "".concat(t, "-").concat(n.tag, "-").concat(r));
  }));
}
function D(n) {
  return v(n)[0];
}
function L(n) {
  return n ? Array.isArray(n) ? n : [n] : [];
}
var C = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`, N = function(t) {
  var e = b(h), i = e.csp, r = e.prefixCls, a = C;
  r && (a = a.replace(/anticon/g, r)), y(function() {
    var m = t.current, u = g(m);
    p(a, "@ant-design-icons", {
      prepend: !0,
      csp: i,
      attachTo: u
    });
  }, []);
};
export {
  f as generate,
  D as getSecondaryColor,
  C as iconStyles,
  O as isIconDefinition,
  l as normalizeAttrs,
  L as normalizeTwoToneColors,
  N as useInsertStyles,
  R as warning
};
