/* jQuery & Bootstrap Init */

import jQuery from 'jquery'

window.$ = window.jQuery = jQuery;

/* Fix */

import './fix.scss'

let location = window.location;
let pathname = location.pathname;

window.axios = require('axios')
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'

window.OT = require("@opentok/client")

import Vue from 'vue'
window.Vue = Vue
Vue.prototype.$eventBus = new Vue()

import Vuetify from 'vuetify'
Vue.use(Vuetify)

import store from './components/vuex/index'

const files = require.context('./', true, /\.vue$/i, 'lazy').keys()

files.forEach(file => {
    let component = file.split('/').pop().split('.')[0]
    Vue.component(component, () => import(`${file}`))
})

let app = new Vue({
    el: '#meetingsApp',
    store,
    vuetify: new Vuetify()
})