import dayjs from 'dayjs';
import { createPinia } from 'pinia';
import { createApp } from 'vue';
import 'dayjs/locale/zh-cn';
import localeData from 'dayjs/plugin/localeData';

dayjs.extend(localeData);
dayjs.locale('zh-cn');

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import App from './App.vue';
import router from './router';
import { hasPriv } from './utils/gw_hasPriv';

const pinia = createPinia();

const app = createApp(App);
app.use(router);
app.use(pinia);
app.use(Antd);
app.use(ElementPlus);
app.config.globalProperties.ownPriv = hasPriv;
app.config.globalProperties.hasPriv = hasPriv;
window.hasPriv = hasPriv;
window.ownPriv = hasPriv;
app.mount('#root');
