/** 重置样式 */
import '@/styles/reset.css'
import 'uno.css'
import '@/styles/global.scss'
import 'virtual:svg-icons-register'

import { createApp } from 'vue'
import { setupRouter } from '@/router'
import { setupStore } from '@/store'
import App from './App.vue'
import { setupNaiveDiscreteApi } from './utils'
import mitt from 'mitt'

const eventBus = mitt()

async function setupApp() {
  const app = createApp(App)
  setupStore(app)
  app.config.globalProperties.$bus = eventBus
  await setupRouter(app)
  app.mount('#app')
  setupNaiveDiscreteApi()
}

setupApp()
