import Vue from 'vue'
import VueSVGIcon from 'vue-svgicon'

import App from '@/app/app'
import router from '@/router'
import i18n from '@/i18n'
import storage from '@/helper/storage'
// eslint-disable-next-line
import styles from './styles/fonts.scss'

import '@/registerComponents'
import '@/registerServiceWorker'
import VueApollo from 'vue-apollo'
import ApolloClient from 'apollo-boost'

Vue.config.productionTip = false
Vue.use(VueSVGIcon)
Vue.use(storage)
Vue.use(VueApollo)

const apolloClient = new ApolloClient({
  uri: process.env.VUE_APP_BACKEND_URL
})

const apolloProvider = new VueApollo({
  defaultClient: apolloClient
})

new Vue({
  i18n,
  router,
  apolloProvider,
  data: {
    backupStorage: {
      answers: undefined,
      emphasized: undefined
    }
  },
  render: h => h(App)
}).$mount('#app')
