import { createPinia } from 'pinia'
import ArcoVue, { Notification } from '@arco-design/web-vue'

import '@arco-design/web-vue/dist/arco.less'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import { createApp } from 'vue'
import crco from 'crco'
import isToday from 'dayjs/plugin/isToday'
import dayjs from 'dayjs'
import axios from './utils/axios'
import router from './router/index'
import App from './App.vue'
import 'crco/dist/index.css'
import './assets/css/arco.scss'
import './assets/css/tailwind.css'

dayjs.extend(isToday)

const pinia = createPinia()

window.axios = axios

const app = createApp(App)

app
  .use(pinia)
  .use(router)
  .use(ArcoVue)
  .use(ArcoVueIcon)
  .use(crco, {
    axios,
    method: 'POST'
  })
  .mount('#app')
// eslint-disable-next-line no-underscore-dangle
Notification._context = app._context
