import { computed } from 'vue';
import { defineStore } from 'pinia';
import { tryOnMounted } from '@vueuse/core';
import '../../../../api/guardBasic/controller/index.mjs';
import { usePostBasicV1SystemListAll } from '../../../../api/guardBasic/controller/JiChuFuWu/XiTongGuanLi/usePostBasicV1SystemListAll.mjs';

const useSystemListStore = defineStore("gmSystemList", () => {
  const { isLoading, exec, data } = usePostBasicV1SystemListAll();
  const systemList = computed(() => data.value?.data || []);
  const getSystemList = async () => {
    if (systemList.value.length !== 0 || isLoading.value) {
      return;
    }
    return exec();
  };
  tryOnMounted(() => {
    getSystemList();
  });
  return {
    systemList,
    isLoading,
    getSystemList
  };
});

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