import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import { withFallbackImage } from "./utils";
import "./styles/scrollbar.css";
import "./styles/elui.css";
import "./styles/main.css";
import '@/assets/fonts/font.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

// import AreaTag from '@/components/base/AreaTag/index.vue'
// import LeftBtn from "@/components/base/PageBtn/LeftBtn.vue";
// import RightBtn from "@/components/base/PageBtn/RightBtn.vue";
// import OverviewMainBox from "@/components/base/BoxBackground/OverviewMainBox.vue";
// import OverviewNormalBox from "@/components/base/BoxBackground/OverviewNormalBox.vue";
// import AnalysisBox from '@/components/base/BoxBackground/AnalysisBox.vue'
// import NewsList from '@/components/base/NewsList/index.vue'
// import ModuleHeader from '@/components/base/ModuleHeader/index.vue'
// import RiskSignal from "@/components/base/RiskSignal/index.vue";
// import MessageBubble from "@/components/base/MessageBubble/index.vue";
// import SourceTabLsit from '@/components/base/SourceTabList/index.vue'
// import ActionButton from "@/components/base/ActionButton/index.vue"

// 引入 Pinia 实例
import pinia from './stores'
const app = createApp(App);

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

// 注册全局函数
app.config.globalProperties.$withFallbackImage = withFallbackImage;
app.use(router);
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(pinia) // 挂载 Pinia
// app.component('AreaTag', AreaTag)  // 领域标签
// app.component('LeftBtn', LeftBtn)  // 向左按钮 
// app.component('RightBtn', RightBtn)  // 向右按钮
// app.component('OverviewMainBox', OverviewMainBox)  // 概览页最新动态背景盒子
// app.component('OverviewNormalBox', OverviewNormalBox)  // 概览页一版模块背景盒子
// app.component('AnalysisBox', AnalysisBox)  // 分析页模块背景
// app.component('ModuleHeader', ModuleHeader)  // 模块头部
// app.component('RiskSignal', RiskSignal)  // 风险信号
// app.component('NewsList', NewsList)  // 新闻资讯
// app.component('MessageBubble', MessageBubble)  // 社交媒体
// app.component('SourceTabLsit', SourceTabLsit)  // 资源库tab列表
// app.component('ActionButton', ActionButton)  // 普通按钮和激活按钮


app.mount("#app");
