"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");
require("../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.js");
const utils = require("../../../../utils/utils.js");
require("../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.js");
require("../../../../enums/pageEnum.js");
require("../../../../router/index.js");
require("../../../../store/modules/designStore/designStore.js");
require("../../../../settings/designSetting.js");
require("../../../../components/GoLoading/index.js");
require("../../../../components/GoSkeleton/index.vue.js");
const icon = require("../../../../plugins/icon.js");
const useLayout_hook = require("./useLayout.hook.js");
const index_d = require("../../../../packages/index.d.js");
const packagesStore = require("../../../../store/modules/packagesStore/packagesStore.js");
const chartLayoutStore_d = require("../../../../store/modules/chartLayoutStore/chartLayoutStore.d.js");
const reactivity_esmBundler = require("../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const { AirPlaneOutlineIcon, ImageIcon, BarChartIcon } = icon.icon.ionicons5;
const { TableSplitIcon, RoadmapIcon, SpellCheckIcon, GraphicalDataFlowIcon } = icon.icon.carbon;
const packagesListObj = {
  [index_d.PackagesCategoryEnum.CHARTS]: {
    icon: utils.renderIcon(RoadmapIcon),
    label: index_d.PackagesCategoryName.CHARTS
  },
  [index_d.PackagesCategoryEnum.INFORMATIONS]: {
    icon: utils.renderIcon(SpellCheckIcon),
    label: index_d.PackagesCategoryName.INFORMATIONS
  },
  [index_d.PackagesCategoryEnum.TABLES]: {
    icon: utils.renderIcon(TableSplitIcon),
    label: index_d.PackagesCategoryName.TABLES
  },
  [index_d.PackagesCategoryEnum.DECORATES]: {
    icon: utils.renderIcon(GraphicalDataFlowIcon),
    label: index_d.PackagesCategoryName.DECORATES
  },
  [index_d.PackagesCategoryEnum.PHOTOS]: {
    icon: utils.renderIcon(ImageIcon),
    label: index_d.PackagesCategoryName.PHOTOS
  },
  [index_d.PackagesCategoryEnum.ICONS]: {
    icon: utils.renderIcon(AirPlaneOutlineIcon),
    label: index_d.PackagesCategoryName.ICONS
  }
};
const useAsideHook = () => {
  const packagesStore$1 = packagesStore.usePackagesStore();
  const menuOptions = [];
  const handlePackagesList = () => {
    for (const val in packagesStore$1.getPackagesList) {
      menuOptions.push({
        key: val,
        // @ts-ignore
        icon: packagesListObj[val].icon,
        // @ts-ignore
        label: packagesListObj[val].label,
        // @ts-ignore
        list: packagesStore$1.getPackagesList[val]
      });
    }
  };
  handlePackagesList();
  let beforeSelect = menuOptions[0]["key"];
  const selectValue = reactivity_esmBundler.ref(menuOptions[0]["key"]);
  const selectOptions = reactivity_esmBundler.ref(menuOptions[0]);
  const clickItemHandle = (key, item) => {
    selectOptions.value = item;
    if (beforeSelect === key) {
      useLayout_hook.setItem(chartLayoutStore_d.ChartLayoutStoreEnum.CHARTS, !useLayout_hook.getCharts.value, false);
    } else {
      useLayout_hook.setItem(chartLayoutStore_d.ChartLayoutStoreEnum.CHARTS, true, false);
    }
    beforeSelect = key;
  };
  return {
    getCharts: useLayout_hook.getCharts,
    BarChartIcon,
    themeColor: useLayout_hook.themeColor,
    selectOptions,
    selectValue,
    clickItemHandle,
    menuOptions
  };
};
exports.useAsideHook = useAsideHook;
