import routerMap from './router.map'
import { parseRoutes } from '@vue2-client/utils/routerUtil'

// 异步路由配置
const routesConfig = [
  'login',
  'submitTicket',
  'ServiceReview',
  'dynamicStatistics',
  'newDynamicStatistics',
  'XReportGrid',
  'example',
  'settings',
  'root',
  'bigDashboard',
  {
    router: 'exp404',
    path: '*',
    name: '404'
  },
  {
    router: 'exp403',
    path: '/403',
    name: '403'
  }
]

const options = {
  mode: 'history',
  base: `/${process.env.VUE_APP_PUBLIC_PATH}/`.replaceAll('//', '/'),
  routes: parseRoutes(routesConfig, routerMap),
  config: routesConfig
}

export default options
