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

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import UndrawUi from 'undraw-ui'
import 'undraw-ui/dist/style.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './styles/MainLayout.css'


// 创建Pinia实例
const pinia = createPinia()

const app = createApp(App)
app.use(UndrawUi)
app.use(Router)
app.use(ElementPlus)
app.use(pinia) // 添加Pinia支持

// 注册所有Element Plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')