import { defineStore } from 'pinia'
import { store } from '@/stores'

interface IAppInfo {
  lastBuildTime: string
}
export const useSystemStore = defineStore({
  id: 'systemStore',
  state: () => ({
    appInfo: {} as IAppInfo
  }),
  getters: {
    getAppInfo: state => state.appInfo
  },
  actions: {
    clearStore() {
      this.$reset()
    }
  },
  persist: {
    storage: window.sessionStorage
  }
})
export const useSystemStoreWithOut = () => useSystemStore(store)
