"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const index = require("../../../packages/index.js");
const reactivity_esmBundler = require("../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const useComInstall = (localStorageInfo) => {
  const show = reactivity_esmBundler.ref(false);
  const intervalTiming = setInterval(() => {
    if (window["$vue"].component) {
      clearInterval(intervalTiming);
      const intComponent = (target) => {
        if (!window["$vue"].component(target.chartConfig.chartKey)) {
          window["$vue"].component(target.chartConfig.chartKey, index.fetchChartComponent(target.chartConfig));
        }
      };
      localStorageInfo.componentList.forEach(async (e) => {
        if (e.isGroup) {
          e.groupList.forEach((groupItem) => {
            intComponent(groupItem);
          });
        } else {
          intComponent(e);
        }
      });
      show.value = true;
    }
  }, 200);
  return {
    show
  };
};
exports.useComInstall = useComInstall;
