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: 'competition/list',
        name: '赛事管理',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/competition/index.vue'),
      },
      {
        path: 'registration/detail',
        name: '报名详情',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/registration/index.vue'),
      },
      {
        path: 'order/list',
        name: '订单管理',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/order/index.vue'),
      },
      {
        path: 'banner/index',
        name: '轮播图管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/banner/index.vue'),
      },
      {
        path: 'referee/list',
        name: '评委管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/referee/index.vue'),
      },
      {
        path: 'score/index',
        name: '评分管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/score/index.vue'),
      },
      {
        path: 'participant/list',
        name: '参赛选手管理',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/participant/index.vue'),
      },
      {
        path: 'schedule/list',
        name: '编排',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/schedule/index.vue'),
      },
      {
        path: 'dispatch/list',
        name: '调度',
        meta: {
          keepAlive: false,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/dispatch/index.vue'),
      },
      // 新增页面 - P0核心页面
      {
        path: 'project/list',
        name: '项目管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/project/index.vue'),
      },
      {
        path: 'deduction/list',
        name: '扣分项管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/deduction/index.vue'),
      },
      {
        path: 'result/list',
        name: '成绩管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/result/index.vue'),
      },
      {
        path: 'export/index',
        name: '导出中心',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/export/index.vue'),
      },
      // P1重要页面
      {
        path: 'schedulePlan/list',
        name: '赛程计划',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/schedulePlan/index.vue'),
      },
      {
        path: 'scheduleAthlete/list',
        name: '选手关联',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/scheduleAthlete/index.vue'),
      },
      {
        path: 'judgeInvite/list',
        name: '裁判邀请',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/judgeInvite/index.vue'),
      },
      {
        path: 'judgeProject/list',
        name: '裁判分配',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/judgeProject/index.vue'),
      },
      // P2增强页面
      {
        path: 'live/list',
        name: '直播管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/live/index.vue'),
      },
      {
        path: 'info/list',
        name: '信息发布',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/info/index.vue'),
      },
      {
        path: 'exception/list',
        name: '异常事件',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/exception/index.vue'),
      },
      {
        path: 'activity/list',
        name: '活动日程',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/activity/index.vue'),
      },
      {
        path: 'rules/index',
        name: '赛事规程管理',
        meta: {
          keepAlive: true,
        },
        component: () => import(/* webpackChunkName: "martial" */ '@/views/martial/rules/index.vue'),
      },
    ],
  },
];
