import Vue from 'vue'
import Router from 'vue-router'
import Login from '../view/login/login.vue'
import homes from '../view/home/home.vue'
import activation from '../view/login/activation.vue'
import forgotpage from '../view/login/forgotpage.vue'
import initialization from '../view/login/initialization.vue'
import guide from '../view/home/guide.vue'
import navigation from '../components/navigation.vue'

Vue.use(Router)

export default new Router({
  mode: 'hash',
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'index',
      component: navigation
    },
    {
      path: '/activation',
      name: 'activation',
      component: activation
    },
    {
      path: '/forgotpage',
      name: 'forgotpage',
      component: forgotpage
    },
    {
      path: '/initialization',
      name: 'initialization',
      component: initialization
    },
    {
      path: '/homes',
      name: 'homes',
      component: homes
    },
    {
      path: '/guide',
      name: 'guide',
      component: guide
    }
  ]
})
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}
