import '@renderer/assets/main.css'

import { createPinia } from 'pinia'
import { createApp } from 'vue'
import dayjs from 'dayjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'

import App from '@renderer/App.vue'
import router from '@renderer/router'

const app = createApp(App)
app.config.globalProperties.$dayjs = dayjs

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

app.use(createPinia())
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)

app.mount('#app')
