import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import App from './App.vue'
import router from './router'
import { useAuthStore } from './store/auth.js'
import 'ant-design-vue/dist/antd.css'
import './styles/global.css'

// DataV组件按需引入，避免Vue 3兼容性问题
const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
app.use(router)
app.use(Antd)

// 初始化认证状态
const authStore = useAuthStore()
authStore.initAuth()

app.mount('#app')