import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import {
  ArrowDown,
  Bell,
  CircleCheck,
  Clock,
  Connection,
  DataAnalysis,
  Document,
  EditPen,
  HomeFilled,
  List,
  Message,
  Monitor,
  Pointer,
  Promotion,
  Setting,
  Stamp,
  TrendCharts,
  User,
  UserFilled,
  Warning,
} from '@element-plus/icons-vue'
import App from './App.vue'
import router from './router'
import './style.css'

const app = createApp(App)

// 按需注册图标
const icons = {
  ArrowDown,
  Bell,
  CircleCheck,
  Clock,
  Connection,
  DataAnalysis,
  Document,
  EditPen,
  HomeFilled,
  List,
  Message,
  Monitor,
  Pointer,
  Promotion,
  Setting,
  Stamp,
  TrendCharts,
  User,
  UserFilled,
  Warning,
}
for (const [key, component] of Object.entries(icons)) {
  app.component(key, component)
}

app.use(createPinia())
app.use(router)
app.use(ElementPlus)

app.mount('#app')
