'use strict';

var vue = require('vue');
var pinia = require('pinia');
require('../../../api/materialApi/index.js');
var core = require('@vueuse/core');
var getAliOssConfigs = require('../../../api/materialApi/cross/getAliOssConfigs.js');

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

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