import { createApp } from 'vue'
import { createPinia } from 'pinia'
import router from './router'
import App from '../App.vue'

// Naive UI
import naive from 'naive-ui'

// Vue Flow styles
import '@vue-flow/core/dist/style.css'
import '@vue-flow/core/dist/theme-default.css'

// 全局样式
import '../assets/styles/main.css'
// Font Awesome: 全局引入图标字体样式
import '@fortawesome/fontawesome-free/css/all.min.css'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(naive)

// 初始化认证状态
import { useAuthStore } from '../shared/stores/auth'
const authStore = useAuthStore()
authStore.initAuth()

app.mount('#app')
