import '@das-fed/ui/packages/components/icon/style.css';
import { withInstall as F } from "@das-fed/utils/with-install/index";
import { defineComponent as A, computed as i, createElementBlock as Y, openBlock as d, normalizeStyle as q, createElementVNode as K, renderSlot as Q, shallowReactive as X, shallowRef as ee, createBlock as p, resolveDynamicComponent as ue } from "vue";
const re = ["innerHTML"], oe = /* @__PURE__ */ A({
  __name: "base-icon",
  props: {
    icon: { default: "" },
    size: { default: "large" },
    customSize: {},
    iconColor: { default: "currentColor" }
  },
  setup(e) {
    const u = e, r = {
      large: 20,
      big: 18,
      medium: 16,
      small: 14,
      mini: 12
    }, n = i(() => (u.icon || "").replace(/<title>(.*?)<\/title>(\r?\n)?/g, "")), o = i(() => {
      let t = r[u.size];
      return r[u.size] || (t = u.size), u.customSize !== void 0 && (t = u.customSize), Number.isNaN(Number(t)) || (t = `${t}px`), {
        fontSize: t,
        "--color": u.iconColor
      };
    });
    return (t, Zu) => (d(), Y(
      "i",
      {
        class: "das-icon",
        style: q(o.value)
      },
      [
        K("use", { innerHTML: n.value }, null, 8, re),
        Q(t.$slots, "default")
      ],
      4
      /* STYLE */
    ));
  }
});
var ne = typeof global == "object" && global && global.Object === Object && global, te = typeof self == "object" && self && self.Object === Object && self, ae = ne || te || Function("return this")(), s = ae.Symbol;
function se(e, u) {
  for (var r = -1, n = e == null ? 0 : e.length, o = Array(n); ++r < n; )
    o[r] = u(e[r], r, e);
  return o;
}
var ce = Array.isArray, $ = Object.prototype, ie = $.hasOwnProperty, fe = $.toString, c = s ? s.toStringTag : void 0;
function le(e) {
  var u = ie.call(e, c), r = e[c];
  try {
    e[c] = void 0;
    var n = !0;
  } catch {
  }
  var o = fe.call(e);
  return n && (u ? e[c] = r : delete e[c]), o;
}
var de = Object.prototype, xe = de.toString;
function be(e) {
  return xe.call(e);
}
var ge = "[object Null]", pe = "[object Undefined]", m = s ? s.toStringTag : void 0;
function me(e) {
  return e == null ? e === void 0 ? pe : ge : m && m in Object(e) ? le(e) : be(e);
}
function Re(e) {
  return e != null && typeof e == "object";
}
var Ce = "[object Symbol]";
function Se(e) {
  return typeof e == "symbol" || Re(e) && me(e) == Ce;
}
var R = s ? s.prototype : void 0, C = R ? R.toString : void 0;
function O(e) {
  if (typeof e == "string")
    return e;
  if (ce(e))
    return se(e, O) + "";
  if (Se(e))
    return C ? C.call(e) : "";
  var u = e + "";
  return u == "0" && 1 / e == -1 / 0 ? "-0" : u;
}
function l(e) {
  return e == null ? "" : O(e);
}
function ve(e, u, r) {
  var n = -1, o = e.length;
  u < 0 && (u = -u > o ? 0 : o + u), r = r > o ? o : r, r < 0 && (r += o), o = u > r ? 0 : r - u >>> 0, u >>>= 0;
  for (var t = Array(o); ++n < o; )
    t[n] = e[n + u];
  return t;
}
function ye(e, u, r) {
  var n = e.length;
  return r = r === void 0 ? n : r, ve(e, u, r);
}
var he = "\\ud800-\\udfff", Ae = "\\u0300-\\u036f", $e = "\\ufe20-\\ufe2f", Oe = "\\u20d0-\\u20ff", ze = Ae + $e + Oe, je = "\\ufe0e\\ufe0f", Te = "\\u200d", Ue = RegExp("[" + Te + he + ze + je + "]");
function z(e) {
  return Ue.test(e);
}
function Me(e) {
  return e.split("");
}
var j = "\\ud800-\\udfff", ke = "\\u0300-\\u036f", Le = "\\ufe20-\\ufe2f", Ee = "\\u20d0-\\u20ff", De = ke + Le + Ee, Ie = "\\ufe0e\\ufe0f", we = "[" + j + "]", x = "[" + De + "]", b = "\\ud83c[\\udffb-\\udfff]", Ne = "(?:" + x + "|" + b + ")", T = "[^" + j + "]", U = "(?:\\ud83c[\\udde6-\\uddff]){2}", M = "[\\ud800-\\udbff][\\udc00-\\udfff]", _e = "\\u200d", k = Ne + "?", L = "[" + Ie + "]?", Ze = "(?:" + _e + "(?:" + [T, U, M].join("|") + ")" + L + k + ")*", He = L + k + Ze, We = "(?:" + [T + x + "?", x, U, M, we].join("|") + ")", Pe = RegExp(b + "(?=" + b + ")|" + We + He, "g");
function Je(e) {
  return e.match(Pe) || [];
}
function Ve(e) {
  return z(e) ? Je(e) : Me(e);
}
function Be(e) {
  return function(u) {
    u = l(u);
    var r = z(u) ? Ve(u) : void 0, n = r ? r[0] : u.charAt(0), o = r ? ye(r, 1).join("") : u.slice(1);
    return n[e]() + o;
  };
}
var E = Be("toUpperCase");
function Ge(e) {
  return E(l(e).toLowerCase());
}
function Fe(e, u, r, n) {
  for (var o = -1, t = e == null ? 0 : e.length; ++o < t; )
    r = u(r, e[o], o, e);
  return r;
}
function Ye(e) {
  return function(u) {
    return e == null ? void 0 : e[u];
  };
}
var qe = {
  // Latin-1 Supplement block.
  À: "A",
  Á: "A",
  Â: "A",
  Ã: "A",
  Ä: "A",
  Å: "A",
  à: "a",
  á: "a",
  â: "a",
  ã: "a",
  ä: "a",
  å: "a",
  Ç: "C",
  ç: "c",
  Ð: "D",
  ð: "d",
  È: "E",
  É: "E",
  Ê: "E",
  Ë: "E",
  è: "e",
  é: "e",
  ê: "e",
  ë: "e",
  Ì: "I",
  Í: "I",
  Î: "I",
  Ï: "I",
  ì: "i",
  í: "i",
  î: "i",
  ï: "i",
  Ñ: "N",
  ñ: "n",
  Ò: "O",
  Ó: "O",
  Ô: "O",
  Õ: "O",
  Ö: "O",
  Ø: "O",
  ò: "o",
  ó: "o",
  ô: "o",
  õ: "o",
  ö: "o",
  ø: "o",
  Ù: "U",
  Ú: "U",
  Û: "U",
  Ü: "U",
  ù: "u",
  ú: "u",
  û: "u",
  ü: "u",
  Ý: "Y",
  ý: "y",
  ÿ: "y",
  Æ: "Ae",
  æ: "ae",
  Þ: "Th",
  þ: "th",
  ß: "ss",
  // Latin Extended-A block.
  Ā: "A",
  Ă: "A",
  Ą: "A",
  ā: "a",
  ă: "a",
  ą: "a",
  Ć: "C",
  Ĉ: "C",
  Ċ: "C",
  Č: "C",
  ć: "c",
  ĉ: "c",
  ċ: "c",
  č: "c",
  Ď: "D",
  Đ: "D",
  ď: "d",
  đ: "d",
  Ē: "E",
  Ĕ: "E",
  Ė: "E",
  Ę: "E",
  Ě: "E",
  ē: "e",
  ĕ: "e",
  ė: "e",
  ę: "e",
  ě: "e",
  Ĝ: "G",
  Ğ: "G",
  Ġ: "G",
  Ģ: "G",
  ĝ: "g",
  ğ: "g",
  ġ: "g",
  ģ: "g",
  Ĥ: "H",
  Ħ: "H",
  ĥ: "h",
  ħ: "h",
  Ĩ: "I",
  Ī: "I",
  Ĭ: "I",
  Į: "I",
  İ: "I",
  ĩ: "i",
  ī: "i",
  ĭ: "i",
  į: "i",
  ı: "i",
  Ĵ: "J",
  ĵ: "j",
  Ķ: "K",
  ķ: "k",
  ĸ: "k",
  Ĺ: "L",
  Ļ: "L",
  Ľ: "L",
  Ŀ: "L",
  Ł: "L",
  ĺ: "l",
  ļ: "l",
  ľ: "l",
  ŀ: "l",
  ł: "l",
  Ń: "N",
  Ņ: "N",
  Ň: "N",
  Ŋ: "N",
  ń: "n",
  ņ: "n",
  ň: "n",
  ŋ: "n",
  Ō: "O",
  Ŏ: "O",
  Ő: "O",
  ō: "o",
  ŏ: "o",
  ő: "o",
  Ŕ: "R",
  Ŗ: "R",
  Ř: "R",
  ŕ: "r",
  ŗ: "r",
  ř: "r",
  Ś: "S",
  Ŝ: "S",
  Ş: "S",
  Š: "S",
  ś: "s",
  ŝ: "s",
  ş: "s",
  š: "s",
  Ţ: "T",
  Ť: "T",
  Ŧ: "T",
  ţ: "t",
  ť: "t",
  ŧ: "t",
  Ũ: "U",
  Ū: "U",
  Ŭ: "U",
  Ů: "U",
  Ű: "U",
  Ų: "U",
  ũ: "u",
  ū: "u",
  ŭ: "u",
  ů: "u",
  ű: "u",
  ų: "u",
  Ŵ: "W",
  ŵ: "w",
  Ŷ: "Y",
  ŷ: "y",
  Ÿ: "Y",
  Ź: "Z",
  Ż: "Z",
  Ž: "Z",
  ź: "z",
  ż: "z",
  ž: "z",
  Ĳ: "IJ",
  ĳ: "ij",
  Œ: "Oe",
  œ: "oe",
  ŉ: "'n",
  ſ: "s"
}, Ke = Ye(qe), Qe = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Xe = "\\u0300-\\u036f", eu = "\\ufe20-\\ufe2f", uu = "\\u20d0-\\u20ff", ru = Xe + eu + uu, ou = "[" + ru + "]", nu = RegExp(ou, "g");
function tu(e) {
  return e = l(e), e && e.replace(Qe, Ke).replace(nu, "");
}
var au = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
function su(e) {
  return e.match(au) || [];
}
var cu = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
function iu(e) {
  return cu.test(e);
}
var D = "\\ud800-\\udfff", fu = "\\u0300-\\u036f", lu = "\\ufe20-\\ufe2f", du = "\\u20d0-\\u20ff", xu = fu + lu + du, I = "\\u2700-\\u27bf", w = "a-z\\xdf-\\xf6\\xf8-\\xff", bu = "\\xac\\xb1\\xd7\\xf7", gu = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", pu = "\\u2000-\\u206f", mu = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", N = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ru = "\\ufe0e\\ufe0f", _ = bu + gu + pu + mu, Z = "['’]", S = "[" + _ + "]", Cu = "[" + xu + "]", H = "\\d+", Su = "[" + I + "]", W = "[" + w + "]", P = "[^" + D + _ + H + I + w + N + "]", vu = "\\ud83c[\\udffb-\\udfff]", yu = "(?:" + Cu + "|" + vu + ")", hu = "[^" + D + "]", J = "(?:\\ud83c[\\udde6-\\uddff]){2}", V = "[\\ud800-\\udbff][\\udc00-\\udfff]", a = "[" + N + "]", Au = "\\u200d", v = "(?:" + W + "|" + P + ")", $u = "(?:" + a + "|" + P + ")", y = "(?:" + Z + "(?:d|ll|m|re|s|t|ve))?", h = "(?:" + Z + "(?:D|LL|M|RE|S|T|VE))?", B = yu + "?", G = "[" + Ru + "]?", Ou = "(?:" + Au + "(?:" + [hu, J, V].join("|") + ")" + G + B + ")*", zu = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", ju = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Tu = G + B + Ou, Uu = "(?:" + [Su, J, V].join("|") + ")" + Tu, Mu = RegExp([
  a + "?" + W + "+" + y + "(?=" + [S, a, "$"].join("|") + ")",
  $u + "+" + h + "(?=" + [S, a + v, "$"].join("|") + ")",
  a + "?" + v + "+" + y,
  a + "+" + h,
  ju,
  zu,
  H,
  Uu
].join("|"), "g");
function ku(e) {
  return e.match(Mu) || [];
}
function Lu(e, u, r) {
  return e = l(e), u = u, u === void 0 ? iu(e) ? ku(e) : su(e) : e.match(u) || [];
}
var Eu = "['’]", Du = RegExp(Eu, "g");
function Iu(e) {
  return function(u) {
    return Fe(Lu(tu(u).replace(Du, "")), e, "");
  };
}
var wu = Iu(function(e, u, r) {
  return u = u.toLowerCase(), e + (r ? Ge(u) : u);
});
let f = X({}), g = ee({});
const Nu = (e) => {
  if (!e) return "";
  const u = "DasIcon" + E(wu(e));
  return f[u] || f[e];
}, Pu = async (e) => {
  Object.keys(e).map((u) => {
    const r = e[u];
    r && r.then && r.then((n) => {
      f[u] = n[Object.keys(n)[0]];
    });
  });
}, Ju = async (e) => {
  if (!e || !e.then) return;
  const u = await e;
  Object.keys(u).map((r) => {
    f.value[r] = u[r];
  });
}, Vu = async (e) => {
  var u;
  for (const r of e) {
    const { name: n, raw: o } = r;
    typeof o == "string" ? g.value[n] = o.replace(/<title>(.*?)<\/title>(\r?\n)?/g, "") : (u = o == null ? void 0 : o.then) == null || u.call(o, (t) => {
      g.value[n] = ((t == null ? void 0 : t.default) || t || "").replace(/<title>(.*?)<\/title>(\r?\n)?/g, "");
    });
  }
}, _u = /* @__PURE__ */ A({
  name: "DasIcon",
  __name: "App",
  props: {
    icon: { default: "" },
    size: { default: "large" },
    customSize: {},
    iconColor: { default: "currentColor" }
  },
  setup(e) {
    const u = e, r = i(() => Nu(u.icon)), n = i(() => g.value[u.icon]);
    return (o, t) => n.value ? (d(), p(oe, {
      key: 0,
      icon: n.value,
      size: u.size,
      "icon-color": u.iconColor,
      "custom-size": u.customSize
    }, null, 8, ["icon", "size", "icon-color", "custom-size"])) : (d(), p(ue(r.value), {
      key: 1,
      size: u.size,
      "icon-color": u.iconColor,
      "custom-size": u.customSize
    }, null, 8, ["size", "icon-color", "custom-size"]));
  }
}), Bu = F(_u);
export {
  Ju as DasAutoRegisterAllIcon,
  Pu as DasAutoRegisterIcon,
  oe as DasBaseIcon,
  Bu as DasIcon,
  Vu as DasRegisterIcon,
  Bu as default
};
