import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import '@/style/global.less';
import i18n from '@/locales/useI18n'
import 'virtual:svg-icons-register';
import setupDefaultSetting from '@/utils/setupDefaultSetting'
import ProForm from '@/components/ProForm/main'
import ProComponentsMount from '@/components/main'



import Antd from 'ant-design-vue';
// 用来切换主题
import 'ant-design-vue/dist/antd.variable.min.css'
import "@/utils/default-passive-events"
import { DashOutlined, ExportOutlined, ImportOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, RedoOutlined, PlusCircleOutlined } from '@ant-design/icons-vue'


const app = createApp(App)

ProForm.install(app)
ProComponentsMount.install(app)

app.use(Antd)
app.use(router)
app.use(store)
app.use(i18n)
app.mount('#app');

//全局注册图标
app.component('DashOutlined', DashOutlined)
app.component('ImportOutlined', ImportOutlined)
app.component('EyeOutlined', EyeOutlined)
app.component('EyeInvisibleOutlined', EyeInvisibleOutlined)
app.component('ExportOutlined', ExportOutlined)
app.component('SearchOutlined', SearchOutlined)
app.component('RedoOutlined', RedoOutlined)
app.component('PlusCircleOutlined', PlusCircleOutlined)

setupDefaultSetting()

window.env = import.meta.env.MODE
