import { createApp } from 'vue';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import 'element-plus/dist/index.css';
import './styles/index.scss';

import App from './App.vue';
import router from './router';

const app = createApp(App);

// 注册所有 Element Plus 图标组件
Object.entries(ElementPlusIconsVue).forEach(([key, component]) => {
  app.component(key, component as any);
});

app.use(createPinia());
app.use(router);
app.use(ElementPlus, { locale: zhCn });

app.mount('#app');
