import { defineStore } from 'pinia'
import projectSetting from '@/settings/projectSetting'
import type { IMenuSetting } from '/#/config'

const {
  menuSetting,
  permissionMode,
} = projectSetting

interface ProjectSettingState {
  menuSetting: IMenuSetting
  permissionMode: string
}

export const useProjectSettingStore = defineStore({
  id: 'app-project-setting',
  state: (): ProjectSettingState => ({
    menuSetting,
    permissionMode,
  }),
  getters: {
    getMenuSetting(): object {
      return this.menuSetting
    },
    getPermissionMode(): string {
      return this.permissionMode
    },
  },
  actions: {
  },
})
