"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const chartLayoutStore = require("../../../store/modules/chartLayoutStore/chartLayoutStore.js");
const designStore = require("../../../store/modules/designStore/designStore.js");
const runtimeCore_esmBundler = require("../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const reactivity_esmBundler = require("../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const _hoisted_1 = /* @__PURE__ */ runtimeCore_esmBundler.createElementVNode("span", null, " 拼命加载中... ", -1);
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  setup(__props) {
    const chartLayoutStore$1 = chartLayoutStore.useChartLayoutStore();
    const designStore$1 = designStore.useDesignStore();
    const showModal = reactivity_esmBundler.ref(false);
    const percentage = reactivity_esmBundler.ref(0);
    const themeColor = runtimeCore_esmBundler.computed(() => {
      return designStore$1.getAppTheme;
    });
    runtimeCore_esmBundler.watch(
      () => chartLayoutStore$1.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 = runtimeCore_esmBundler.resolveComponent("n-progress");
      const _component_n_modal = runtimeCore_esmBundler.resolveComponent("n-modal");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_modal, {
        show: showModal.value,
        "close-on-esc": false,
        "transform-origin": "center"
      }, {
        default: runtimeCore_esmBundler.withCtx(() => [
          runtimeCore_esmBundler.createElementVNode("div", null, [
            _hoisted_1,
            runtimeCore_esmBundler.createVNode(_component_n_progress, {
              type: "line",
              color: themeColor.value,
              percentage: percentage.value,
              style: { "width": "300px" }
            }, null, 8, ["color", "percentage"])
          ])
        ]),
        _: 1
      }, 8, ["show"]);
    };
  }
});
exports.default = _sfc_main;
