import { setupVab } from '~/library'
import App from './App.vue'
import { setupI18n } from '/@/i18n'
import { setupRouter } from '/@/router'
import { setupStore } from '/@/store'

// 全局方法
import { useDict } from './utils/dict'
import { download } from '/@/utils/download'
import { addDateRange, handleTree, resetForm } from '/@/utils/index'
// svg图标
import elementIcons from '/@/icon/elementIcon'

const app = createApp(App)

// 全局方法挂载
app.config.globalProperties.download = download
app.config.globalProperties.useDict = useDict
app.config.globalProperties.resetForm = resetForm
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.handleTree = handleTree

setupVab(app)
setupI18n(app)
setupStore(app)
setupRouter(app)
app.use(elementIcons)

app.mount('#app')
