import { createApp } from 'vue'
import App from './App.vue'
import router from './routers'
import vuex from './vuexStore'
import pinia from './store'

import { registerElIcons } from '@/plugins/ElIcons'
// svg-icons注册导入
// @ts-ignore: virtual module injected by svg-icons plugin
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon/index.vue' // svg component
// UI框架 element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入暗黑模式 element-plus 2.2 内置暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
// 自定义暗黑模式
import '@/styles/element-dark.scss'
import '@/styles/cwg_common.scss'
// 引入阿里图标库
import '@/assets/iconfont/iconfont.scss'
import '@/assets/iconfont/iconfont.js'
// 引入国际化
import i18n from './i18n'

// import Config from './config'

// import Pigeon from './lib/pigeon.js'
//定义mixin
const mixins = {
  created() {
    // this.Session = SessionStorage
    // this.Config = Config
  },
}

const app = createApp(App)
registerElIcons(app)

app.mixin(mixins)
app.component('SvgIcon', SvgIcon)

app.use(vuex)
app.use(pinia)
app.use(router)
app.use(i18n)
app.use(ElementPlus).mount('#app')
