/**
 * Vue 应用入口
 * 初始化 Vue3 + Pinia + Router + Element Plus
 */

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import App from './App.vue'
import router from './router'

const app = createApp(App)

// 挂载 Pinia 状态管理
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)

// 挂载路由
app.use(router)

// 挂载 Element Plus (中文语言包)
app.use(ElementPlus, { locale: zhCn })

app.mount('#app')
