import "../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import { useChartLayoutStore } from "../../../store/modules/chartLayoutStore/chartLayoutStore.mjs";
import { useDesignStore } from "../../../store/modules/designStore/designStore.mjs";
import { defineComponent, computed, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode as createBaseVNode, createVNode } from "../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { ref } from "../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
const _hoisted_1 = /* @__PURE__ */ createBaseVNode("span", null, " 拼命加载中... ", -1);
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    const chartLayoutStore = useChartLayoutStore();
    const designStore = useDesignStore();
    const showModal = ref(false);
    const percentage = ref(0);
    const themeColor = computed(() => {
      return designStore.getAppTheme;
    });
    watch(
      () => chartLayoutStore.getPercentage,
      (newValue) => {
        if (newValue === 0) {
          setTimeout(() => {
            percentage.value = newValue;
            showModal.value = false;
          }, 500);
          return;
        }
        percentage.value = newValue;
        showModal.value = newValue > 0;
      }
    );
    return (_ctx, _cache) => {
      const _component_n_progress = resolveComponent("n-progress");
      const _component_n_modal = resolveComponent("n-modal");
      return openBlock(), createBlock(_component_n_modal, {
        show: showModal.value,
        "close-on-esc": false,
        "transform-origin": "center"
      }, {
        default: withCtx(() => [
          createBaseVNode("div", null, [
            _hoisted_1,
            createVNode(_component_n_progress, {
              type: "line",
              color: themeColor.value,
              percentage: percentage.value,
              style: { "width": "300px" }
            }, null, 8, ["color", "percentage"])
          ])
        ]),
        _: 1
      }, 8, ["show"]);
    };
  }
});
export {
  _sfc_main as default
};
