import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//import mqtt from '@/assets/js/mqtt.min'
import mqtt from 'mqtt'
import './quasar'
import VueKonva from 'vue-konva'
import i18n from '@/locale'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
import echarts from 'echarts'
import vuePickers from 'vue-pickers'
//import SvgIcon from 'vue-svgicon'
//import './icons/interaction'
import vueDrag from 'vue-dragging'
//import animate from 'animate.css'
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText } from '@fortawesome/vue-fontawesome'
import { Quasar, QDialog, ClosePopup, Loading, QRadio } from 'quasar'
import apiTools from '@/api'
import commons from "@/filter/guid.js"
//import jwtDecode from 'jwt-decode'
import './assets/mobile/common.css' /*���빫����ʽ*/
import { Button } from 'vant';
import 'vant/lib/index.css';
import moment from 'moment'//ʱ��ת��
import mqttconnect from './plugin/mqttconnect.js' // MQTT���ӷ���
import draggable from 'vuedraggable'    //�϶����


import './assets/icons';


Vue.use(mqttconnect) 
Vue.use(draggable) 
require('@/assets/css/common.css')
require('@/assets/css/style.less')
library.add(fas, far, fab)

Vue.prototype.$moment = moment;//��ֵʹ��

Vue.config.devtools = true
Vue.config.productionTip = false

Object.defineProperty(Vue.prototype, '$mqtt', { value: mqtt });
Vue.prototype.common = commons
Vue.prototype.$echarts = echarts
Vue.prototype.$api = apiTools
//Vue.prototype.$jwtDecode = jwtDecode
Vue.use(Button);

Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.component('font-awesome-layers', FontAwesomeLayers)
Vue.component('font-awesome-layers-text', FontAwesomeLayersText)

Vue.use(iView, {
    i18n: (key, value) => i18n.t(key, value)
})
Vue.prototype.$Message.config({
    top: 70,
    duration: 2
});

Vue.use(Quasar, {
    plugins: {
        Loading,
        QRadio
    },
    config: {
        loading: { /* Loading defaults */ }
    },
    components: {
        QDialog,
        Loading,
        QRadio,
    },
    directives: {
        ClosePopup
    }
})

//Vue.use(SvgIcon, { tagName: 'svgicon' })
Vue.use(vuePickers)
Vue.use(vueDrag)
Vue.use(VueKonva)

new Vue({
    router,
    store,
    i18n,
    render: h => h(App)
}).$mount('#app')
