import Vue from 'vue'
import Router from 'vue-router'
import systemRoute from './system'
import packageConfig from '../../package.json'
import {authUtils} from '@/utils/authUtils'

Vue.use(Router)

let routes = []
routes = routes.concat(systemRoute)

const router = new Router({
  mode: 'history',
  base: '/' + packageConfig.name,
  routes: routes
})

router.beforeEach(new authUtils().routerBeforeEach)

export default router
