import { gW as i, gX as c, V as l, gY as p } from "./684d2f28.js";
import { fas as u } from "./e7df707d.js";
import { far as f } from "./49ddbc28.js";
import { A as m } from "./f92320e2.js";
import "react";
import "react-dom";
i.add(f, u);
function d(t) {
  if (t.startsWith("/icon:antd/"))
    return {
      type: "antd",
      name: t.split("/")[2]
    };
  if (t.startsWith("/icon:solid/") || t.startsWith("/icon:regular/")) {
    const [o, s] = t.substring(6).split("/");
    return {
      type: "fontAwesome",
      style: o,
      name: s
    };
  } else
    return t.startsWith("data:image") ? {
      type: "base64",
      data: t,
      name: ""
    } : t.startsWith("http") ? {
      type: "url",
      url: t,
      name: ""
    } : {
      type: "unknown",
      name: ""
    };
}
const y = (t) => t.replace(/(-\w)/g, (o) => o[1].toUpperCase()), I = (t) => t.endsWith("outlined") ? t.replace("outlined", "Outlined") : t.endsWith("filled") ? t.replace("filled", "Filled") : t.endsWith("twotone") ? t.replace("twotone", "TwoTone") : t, W = ({
  identifier: t,
  width: o = "24px",
  height: s = "24px",
  style: a
}) => {
  const e = d(t);
  if (e.type === "fontAwesome") {
    const n = e.style === "solid" ? "fas" : "far", r = c({
      prefix: n,
      iconName: e.name
    });
    return r ? /* @__PURE__ */ l(p, {
      icon: r,
      style: {
        width: o,
        height: s,
        ...a
      }
    }) : (console.error(`Icon ${e.name} with prefix ${n} not found`), null);
  } else if (e.type === "antd") {
    let n = y(e.name);
    n = I(n), n = n.charAt(0).toUpperCase() + n.slice(1);
    const r = m[n];
    return r ? /* @__PURE__ */ l(r, {
      style: {
        fontSize: o,
        ...a
      }
    }) : (console.error(`ANTd Icon ${e.name} not found`), null);
  } else
    return e.type === "url" || e.type === "base64" ? /* @__PURE__ */ l("img", {
      src: e.type === "url" ? e.url : e.data,
      alt: "icon",
      style: {
        width: o,
        height: s,
        ...a
      }
    }) : null;
}, b = W;
export {
  b as MultiIconDisplay
};
