import '@das-fed/ui/packages/components/spin/style.css';
import { getVarValue as u, setThemeRule as _ } from "@das-fed/web/packages/theme/index";
import { setI18nRule as v, t as g } from "@das-fed/web/packages/i18n/index";
import { withInstall as $ } from "@das-fed/utils/with-install/index";
import { createElementBlock as d, openBlock as r, createStaticVNode as m, createElementVNode as l, defineComponent as C, ref as h, useAttrs as S, watch as p, h as n, normalizeClass as z, createVNode as I, unref as f, mergeProps as y, withCtx as L, renderSlot as b } from "vue";
import { Spin as k } from "ant-design-vue";
import "ant-design-vue/es/spin/style/css";
import { DasIconLoad as x } from "@das-fed/ui/packages/icons/load/index";
import "@das-fed/ui/packages/global/theme";
const c = (t, o) => {
  const a = t.__vccOpts || t;
  for (const [i, s] of o)
    a[i] = s;
  return a;
}, N = {}, B = { class: "das-spin-container das-spin-page" };
function D(t, o) {
  return r(), d("div", B, o[0] || (o[0] = [
    m('<div class="das-spin-dot-spin" data-v-323f37a9><i class="das-spin-dot-item" data-v-323f37a9></i><i class="das-spin-dot-item" data-v-323f37a9></i><i class="das-spin-dot-item" data-v-323f37a9></i><i class="das-spin-dot-item" data-v-323f37a9></i></div>', 1)
  ]));
}
const E = /* @__PURE__ */ c(N, [["render", D], ["__scopeId", "data-v-323f37a9"]]), P = {}, R = { class: "das-spin-container das-spin-component" };
function A(t, o) {
  return r(), d("div", R, o[0] || (o[0] = [
    l(
      "div",
      { class: "das-spin-dot-spin" },
      [
        l("i", { class: "das-spin-dot-item" })
      ],
      -1
      /* CACHED */
    )
  ]));
}
const O = /* @__PURE__ */ c(P, [["render", A], ["__scopeId", "data-v-f47a1ae6"]]), T = {}, V = { class: "das-spin-container das-spin-containerload" };
function j(t, o) {
  return r(), d("div", V, o[0] || (o[0] = [
    m('<div class="das-spin-dot-spin" data-v-f7548f22><i class="das-spin-dot-item" data-v-f7548f22></i><i class="das-spin-dot-item" data-v-f7548f22></i><i class="das-spin-dot-item" data-v-f7548f22></i><i class="das-spin-dot-item" data-v-f7548f22></i></div>', 1)
  ]));
}
const q = /* @__PURE__ */ c(T, [["render", j], ["__scopeId", "data-v-f7548f22"]]), w = /* @__PURE__ */ C({
  __name: "index",
  props: {
    type: { default: "page" },
    size: { default: "big" },
    customSize: { default: "28" },
    iconColor: { default: () => u("--das-ui-spin-logo-5-color") },
    full: { type: Boolean, default: !0 }
  },
  setup(t) {
    let o = t, a = h("");
    const i = S();
    return p(
      () => o.type,
      (s, e) => {
        console.log(s, e), s == "page" && (a.value = n(E)), s == "container" && (a.value = n(q)), s == "component" && (a.value = n(O)), s == "load" && (a.value = n(x, {
          iconColor: o.iconColor,
          customSize: o.customSize
        }));
      },
      { immediate: !0 }
    ), p(
      () => i,
      (s, e) => {
        console.log("attrs", s, e), i.indicator && (a.value = i.indicator);
      },
      { immediate: !0 }
    ), (s, e) => (r(), d(
      "div",
      {
        class: z({ "das-spin-container": !0, full: s.full })
      },
      [
        I(f(k), y({
          class: `das-slef-spin ${s.size} ${s.type} `
        }, s.$attrs, { indicator: f(a) }), {
          default: L(() => [
            b(s.$slots, "default")
          ]),
          _: 3
          /* FORWARDED */
        }, 16, ["class", "indicator"])
      ],
      2
      /* CLASS */
    ));
  }
}), F = {
  "--das-ui-spin-logo-1-color": "#2486ee",
  "--das-ui-spin-logo-2-color": "#02ccfe",
  "--das-ui-spin-logo-3-color": "#05c8c7",
  "--das-ui-spin-logo-4-color": "#a06eff",
  "--das-ui-spin-logo-5-color": "#5582f3",
  "--das-ui-spin-logo-6-color": "#ebebeb"
}, G = { 加载中: { "zh-CN": "加载中", en: "Loading", _appCode: "framework" } };
v(G);
_(F);
const Y = $(w), Z = { name: `Spin ${g("加载中")}` };
export {
  Y as DasSpin,
  Z as default
};
