import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import './styles/design-system.css'
import App from './App.vue'
import router from './router'
import i18n from './locales'
import { useUserStore } from './stores/user'
import lazyLoadDirective from './directives/lazyLoad'

const app = createApp(App)

const pinia = createPinia()
app.use(pinia)
app.use(router)
app.use(i18n)
app.use(Antd)
app.use(lazyLoadDirective)

console.log('[main.js] i18n 当前语言:', i18n.global.locale.value)

// 立即挂载应用
app.mount('#app')

console.log('[main.js] 应用已挂载，当前语言:', i18n.global.locale.value)
