import { createApp } from "vue";
import "element-plus/dist/index.css";
import "@/assets/style/public.scss";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import directiveSetup from "./directive/setup";
import App from "./App.vue";
import ElementPlus from "element-plus";
import { setApp } from "@/helper/mount";
import { router } from "./router";
import { appConstant } from "./app";
import 'virtual:windi.css'
import "@/store/system";
import '@/assets/font/iconfont.css'
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
directiveSetup(app);
app.use(ElementPlus);
app.use(router);
setApp(app);
app.mount("#app");

const $ico = document.createElement("link");
$ico.setAttribute("rel", "icon");
$ico.setAttribute("type", "image/svg+xml");
$ico.setAttribute("href", appConstant.ico);
document.head.appendChild($ico);
