import { createApp } from 'vue';

import globalComponents from '@/components/global';
import App from './App.vue';
import router from './router';
import store from './store';
import directives from './directives';
import { capsule, appUpdateObserver } from '@/utils/tool';
import { Loading } from 'tdesign-vue-next';
import 'virtual:svg-icons-register';
import 'tdesign-vue-next/es/style/index.css';
// import 'tdesign-vue-next/dist/reset.css';
import './style/index.less';
import './style/global.less';
import './style/black.less';
import 'uno.css';
import { setGlobalOptions } from 'vue-request';
import packageJson from '../package.json';
// import './mock/index';
setGlobalOptions({
  manual: true, //当 manual 设置为 true 时，你需要手动触发 run 或者 runAsync 才会发起请求 ,见vue-request文档：https://www.attojs.com/api/#manual
});
const app = createApp(App);

app.use(router).use(store).use(directives).use(globalComponents).use(Loading);

app.config.globalProperties.$title = import.meta.env.VITE_APP_TITLE;

app.mount('#app');

capsule('质控平台', `v${packageJson.version} release`);
appUpdateObserver();
