'use strict';

var vue = require('vue');
var pinia = require('pinia');
require('../../../api/gstore/controller/index.js');
var core = require('@vueuse/core');
var useGetV1BasicGetAliCategoryList = require('../../../api/gstore/controller/JiChuXinXi/useGetV1BasicGetAliCategoryList.js');

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

exports.useAliCategoryListStore = useAliCategoryListStore;
//# sourceMappingURL=index.js.map
