import Layout from '@/page/index/index.vue';
import Store from '@/store/';

export default [
  {
    path: '/wel',
    component: () =>
      Store.getters.isMacOs ? import('@/mac/index.vue') : import('@/page/index/index.vue'),
    redirect: '/wel/index',
    children: [
      {
        path: 'index',
        name: '首页',
        meta: {
          i18n: 'dashboard',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/wel/index.vue'),
      },
      {
        path: 'dashboard',
        name: '控制台',
        meta: {
          i18n: 'dashboard',
          menu: false,
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/wel/dashboard.vue'),
      },
    ],
  },
  {
    path: '/info',
    component: Layout,
    redirect: '/info/index',
    children: [
      {
        path: 'index',
        name: '个人信息',
        meta: {
          i18n: 'info',
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/system/userinfo.vue'),
      },
    ],
  },
  {
    path: '/martial',
    component: Layout,
    redirect: '/martial/order/list',
    children: [
      {
        path: 'registration/detail',
        name: '报名详情',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/registration/detail.vue'),
      },
      {
        path: 'schedule/list',
        name: '编排',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/schedule/list.vue'),
      },
      {
        path: 'dispatch/list',
        name: '调度',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/dispatch/list.vue'),
      },
    ],
  },
];
