import { createApp } from 'vue'
import ArcoVue from '@arco-design/web-vue'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import { router, setupRouter } from '@/router'

import globalComponents from '@/components'
import { setupRouterGuard } from '@/router/guard'
import directive from '@/directive'
import i18n from './locale'
import store from './store'
import App from './App.vue'

// import '@arco-themes/vue-siot-web-manager/css/arco.css'
import '@arco-design/web-vue/dist/arco.css';
import '@/assets/style/global.less'
async function bootstrap() {
  const app = createApp(App)
  app.use(ArcoVue, {})
  app.use(ArcoVueIcon)
  app.use(store)
  app.use(i18n)
  setupRouter(app)
  app.use(globalComponents)
  setupRouterGuard(router) // 设置路由守卫
  app.use(directive)
  
  app.mount('#app')

}
bootstrap().then()
