import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import esriConfig from "@arcgis/core/config";
import ldMap from './utils/map/init';
import ldBox from './utils/map/mapBox';
import { download } from './utils/request';

import directive from '@/directive' // directive

import router from './router'
// 分页组件
import Pagination from '@/components/Pagination'
import {useDict} from './utils/dict';
esriConfig.assetsPath = "./assets";
import '@arcgis/core/assets/esri/themes/dark/main.css';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 使用element-plus 并且设置全局的大小
import store from './store'
import elementIcons from '@/components/SvgIcon/svgicon'
import plugins from '@/plugins' // plugins
const app = createApp(App)
import './permission'
app.component('Pagination', Pagination)
// app.config.globalProperties.$ldMap = ldMap
// app.config.globalProperties.$ldBox = ldBox
app.config.globalProperties.useDict = useDict
app.config.globalProperties.download = download
app.provide('$ldMap', ldMap)
app.provide('$ldBox', ldBox)
directive(app)
app.use(elementIcons)
app.use(ElementPlus)
app.use(plugins)
app.use(router)
app.use(store)
app.mount('#app')
