import { createApp } from 'vue'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css'

import Cell from '@/components/Cell/index.vue'
import PageHeader from '@/components/PageHeader/index.vue'
import QueryForm from '@/components/QueryForm/index.vue'
import QueryTable from '@/components/QueryTable/index.vue'
import App from './App.vue'
import router from './router'

const app = createApp(App)

app.config.errorHandler = (err, vm, info) => {
  console.error(err, vm, info)
}

app.component('cell', Cell)
app.component('page-header', PageHeader)
app.component('query-form', QueryForm)
app.component('query-table', QueryTable)

app.use(router)
app.use(ElementPlus)
app.mount('#app')
