import Vue from 'vue'
import VueApexCharts from 'vue-apexcharts'
import VueAuth from '@websanova/vue-auth'
import Vuelidate from 'vuelidate'
import VueShortcuts from 'vue-shortcuts'
import Pusher from 'pusher-js'
import store from './store'
import './registerServiceWorker'
import './lang'
import './axios'
import './style'
import './progress'
import './filters'
import '@/utils/consoleLogs'
import router from './router'
import App from './App.vue'

Vue.config.productionTip = false
window.Pusher = Pusher

Vue.use(VueApexCharts)
Vue.component('apexchart', VueApexCharts)
Vue.use(VueShortcuts, { prevent: ['input', 'textarea'] })
Vue.use(Vuelidate)
Vue.use(VueAuth, {
  auth: require('@websanova/vue-auth/drivers/auth/bearer.js'),
  http: require('@websanova/vue-auth/drivers/http/axios.1.x.js'),
  router: require('@websanova/vue-auth/drivers/router/vue-router.2.x.js'),
  rolesVar: 'view_permissions',
  parseUserData: user => user
})

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