import { computed } from 'vue';
import { defineStore } from 'pinia';
import '../../../api/gstore/controller/index.mjs';
import { tryOnMounted } from '@vueuse/core';
import { useGetV1BasicGetAliCategoryList } from '../../../api/gstore/controller/JiChuXinXi/useGetV1BasicGetAliCategoryList.mjs';

const useAliCategoryListStore = defineStore("gmAliCategoryList", () => {
  const { isLoading, exec, data: aliCategoryListData } = useGetV1BasicGetAliCategoryList();
  const aliCategoryList = computed(() => aliCategoryListData.value?.data || []);
  const getAliCategoryList = async () => {
    if (aliCategoryList.value.length !== 0 || isLoading.value) {
      return;
    }
    return exec();
  };
  tryOnMounted(() => {
    getAliCategoryList();
  });
  return {
    aliCategoryList,
    isLoading,
    getAliCategoryList
  };
});

export { useAliCategoryListStore };
//# sourceMappingURL=index.mjs.map
