import { createApp } from "vue"
import { createPinia } from "pinia"
import piniaPluginPersist from "pinia-plugin-persist"
import App from "./App.vue"
import router from "./router"
import "./permission"
import "@/micro/index.js"
import i18n from "@/i18n"
import "@/assets/style/index.scss"
import "virtual:svg-icons-register"
import SvgIcon from "@/components/SvgIcon/index.vue"
import elementIcons from "@/components/SvgIcon/svgicon.js"
import directive from "./directive"

const pinia = createPinia()
pinia.use(piniaPluginPersist)
const app = createApp(App)
directive(app)
app.use(pinia)
app.use(router)
app.use(elementIcons)
app.component("svg-icon", SvgIcon)
app.use(i18n)
app.mount("#app")