import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router'
// import './styles/index.scss'
import App from './App.vue'
import i18n from './i18n' // 导入i18n配置
// 导入自定义消息工具
import message from './utils/message'

const app = createApp(App)
app.use(createPinia())


// 如果您正在使用CDN引入，请删除下面一行。
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Breadcrumb from '@/components/Breadcrumb.vue'



// 注册i18n
app.use(i18n)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


app.use(router)
app.use(ElementPlus)
// 全局注册 Breadcrumb 组件
app.component('Breadcrumb', Breadcrumb)
// 全局注册消息工具
app.config.globalProperties.$message = message;

app.mount('#app')