// css和scss
import './assets/styles/global.scss'
import 'element-plus/dist/index.css'

//语言配置
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import i18n from './i18n'
import {setupAuthDirective} from './directives/auth'
import { setStorage } from '@/utils/storage'
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css'
import ContextMenu from '@imengyu/vue3-context-menu'

setStorage("one", "1")

const app = createApp(App)
setupAuthDirective(app)
app.use(createPinia())
app.use(router)
app.use(i18n)
app.use(ContextMenu)
app.use(ElementPlus, {
    locale: zhCn,
})

app.mount('#app')

// 导出 app 实例以便在其他地方使用
export default app
