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