import {createApp} from 'vue'
import App from './App.vue'
import './index.css'

import router from '@/router/index'

import ElementPlus from 'element-plus'
import zhTW from 'element-plus/dist/locale/zh-tw.mjs'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import 'virtual:svg-icons-register'
import svg_icon from '@/components/svg-icon.vue'

import store from './store/index'

const app = createApp(App)
app.use(router.router)
app.use(ElementPlus,{
    locale: zhTW,
})
app.use(store)
app.component('svg-icon', svg_icon)

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

app.mount('#app')
