import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode } from "vue";
import { u as useChartLayoutStore } from "./chartLayoutStore-de4e7ebb.js";
import { y as useDesignStore } from "./index-67bc0910.js";
const _hoisted_1 = /* @__PURE__ */ createElementVNode("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(() => [
          createElementVNode("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
};
