import { defineStore } from "pinia";
import { useRequest } from "@/composables/useRequest.js";

const useStore = defineStore("main", {
  state : () => ({
    config: {
      tw: {},
      en: {},
      cn: {},
    }
  }),
  actions: {
    async getConfig() {
      let res = await useRequest('/index/getConfig');
      if(res.code === 200){
        this.config = res.data;
      }
    }
  },
  getters: {},
});

export default useStore;
