import { ref } from 'vue';
import { defineStore } from 'pinia';
import '../../../api/materialApi/index.mjs';
import { tryOnMounted } from '@vueuse/core';
import { getAliOssConfigs } from '../../../api/materialApi/cross/getAliOssConfigs.mjs';

const useAliOssConfigsStore = defineStore("gmaliOssConfigs", () => {
  const aliOssConfigs = ref(null);
  const isLoading = ref(false);
  const getaliOssConfigsAsync = async () => {
    if (aliOssConfigs.value) return;
    isLoading.value = true;
    try {
      const { data } = await getAliOssConfigs();
      aliOssConfigs.value = data.data;
    } finally {
      isLoading.value = false;
    }
  };
  tryOnMounted(() => {
    getaliOssConfigsAsync();
  });
  return {
    isLoading,
    aliOssConfigs,
    getaliOssConfigsAsync
  };
});

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