import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import router from './router'
import store from './store'

import '@/icons' // icon
import '@/permission' // permission control

import VueAMap, { lazyAMapApiLoaderInstance } from 'vue-amap'

// Vue.use(ElementUI, { locale })
Vue.use(ElementUI)
Vue.use(VueAMap)

Vue.config.productionTip = false

VueAMap.initAMapApiLoader({
  key: 'f0d1d4f82432504003ebf46e5e36ff03',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.DistrictLayer', 'AMap.Geocoder'],
  // 默认高德 sdk 版本为 1.4.10
  v: '1.4.14'
})

lazyAMapApiLoaderInstance.load().then(() => {
  new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
  })
})
