"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Vue = require("vue");
const m = "el", l = "is-", c = (a, r, t, o, $) => {
  let u = `${a}-${r}`;
  return t && (u += `-${t}`), o && (u += `__${o}`), $ && (u += `--${$}`), u;
}, B = Symbol("namespaceContextKey"), C = (a) => {
  const r = Vue.getCurrentInstance() ? Vue.inject(B, Vue.ref(m)) : Vue.ref(m);
  return Vue.computed(() => Vue.unref(r) || m);
}, q = (a, r) => {
  const t = C();
  return {
    namespace: t,
    b: (s = "") => c(t.value, a, s, "", ""),
    e: (s) => s ? c(t.value, a, "", s, "") : "",
    m: (s) => s ? c(t.value, a, "", "", s) : "",
    be: (s, e) => s && e ? c(t.value, a, s, e, "") : "",
    em: (s, e) => s && e ? c(t.value, a, "", s, e) : "",
    bm: (s, e) => s && e ? c(t.value, a, s, "", e) : "",
    bem: (s, e, n) => s && e && n ? c(t.value, a, s, e, n) : "",
    is: (s, ...e) => {
      const n = e.length >= 1 ? e[0] : true;
      return s && n ? `${l}${s}` : "";
    },
    cssVar: (s) => {
      const e = {};
      for (const n in s)
        s[n] && (e[`--${t.value}-${n}`] = s[n]);
      return e;
    },
    cssVarName: (s) => `--${t.value}-${s}`,
    cssVarBlock: (s) => {
      const e = {};
      for (const n in s)
        s[n] && (e[`--${t.value}-${a}-${n}`] = s[n]);
      return e;
    },
    cssVarBlockName: (s) => `--${t.value}-${a}-${s}`
  };
};
exports.defaultNamespace = m;
exports.namespaceContextKey = B;
exports.useGetDerivedNamespace = C;
exports.useNamespace = q;
