// 引入ElementPlus所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
import { createApp } from 'vue';
import ElementPlusX from 'vue-element-plus-x';
import App from './App.vue';
import router from './routers';
import store from './stores';
import './styles/index.scss';
import 'virtual:uno.css';
import 'element-plus/dist/index.css';
import 'virtual:svg-icons-register';

// 创建 Vue 应用
const app = createApp(App);

// 安装插件
app.use(router);
app.use(ElMessage);
app.use(ElementPlusX);

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

app.use(store);

// 输出构建信息
console.log(
  `%c 意心AI 3.3 %c Build Info `,
  'background:#35495e; padding: 4px; border-radius: 3px 0 0 3px; color: #fff',
  'background:#41b883; padding: 4px; border-radius: 0 3px 3px 0; color: #fff',
);
// console.log(`🔹 Git Branch: ${__GIT_BRANCH__}`);
console.log(`🔹 Git Commit: ${__GIT_HASH__}`);
// console.log(`🔹 Commit Date: ${__GIT_DATE__}`);
// console.log(`🔹 Build Time: ${__BUILD_TIME__}`);

// 挂载 Vue 应用
// mount 完成说明应用初始化完毕，此时手动通知 loading 动画结束
app.mount('#app');
