import { RouteConfig } from 'vue-router'

/**
 * 团队管理相关路由 /team
 * 团队管理 /team-management
 * 团队架构 /team-frame
 * 架构部门详情 /team/:id
 * 团队成员信息 /team-member/:id
 * 编辑成员信息 /edit-member
 * 创建团队 /create-team
 * 团队二维码 /team-qrcode
 * 部门管理 /department-management
 * 添加部门 /add-department
 * 团队权限管理 /auth-management
 * 成员二维码 /two-code
 * 申请管理 /apply-list
 * 添加成员 /add-member
 * 选择部门 /select-team
 * 搜索团队 /search-team
 * 加入团队 /join-team
 * 完善团队信息 /team-info
 *
*/

export const teamRoutes: Array<RouteConfig> = [
  {
    path: '/team',
    component: () => import('@/layout/home.vue'),
    redirect: '/team/team-management',
    children: [
      {
        path: 'team-management',
        name: 'TeamManagement',
        component: () => import('@/views/team/team-management.vue'),
        meta: {
          title: '团队管理'
        }
      },
      {
        path: 'team-frame',
        name: 'Team',
        component: () => import('@/views/team/team-frame.vue'),
        meta: {
          title: '组织架构'
        }
      },
      {
        path: 'add-member',
        name: 'AddMember',
        component: () => import('@/views/team/add-member.vue'),
        meta: {
          title: '添加成员'
        }
      },
      {
        path: 'team-frame/:id',
        name: 'TeamDetail',
        component: () => import('@/views/team/team-frame.vue'),
        meta: {
          title: '团队架构'
        }
      },
      {
        path: 'member/:id',
        name: 'TeamMember',
        component: () => import('@/views/team/member-info.vue')
      },
      {
        path: 'create-team',
        name: 'CreateTeam',
        component: () => import('@/views/team/create-team/create-team.vue'),
        meta: {
          title: '创建团队'
        }
      },
      {
        path: 'team-qrcode',
        name: 'TeamQRcode',
        component: () => import('@/views/team/create-team/team-QRcode.vue'),
        meta: {
          title: '团队二维码'
        }
      },
      {
        path: 'edit-member/:id',
        name: 'EditMember',
        component: () => import('@/views/team/edit-member.vue'),
        meta: {
          title: '编辑成员'
        }
      },
      {
        path: 'department-management/:id',
        name: 'DepartmentManagement',
        component: () => import('@/views/team/department-management.vue'),
        meta: {
          title: '部门管理'
        }
      },
      {
        path: 'add-department',
        name: 'AddDepartment',
        component: () => import('@/views/team/add-department.vue'),
        meta: {
          title: '添加部门'
        }
      },
      {
        path: 'two-code',
        name: 'Two-code',
        component: () => import('@/views/team/two-code.vue'),
        meta: {
          title: '成员二维码'
        }
      },
      {
        path: 'auth-management',
        name: 'AuthManagement',
        component: () => import('@/views/team/auth-management.vue'),
        meta: {
          title: '团队管理权限'
        }
      },
      {
        path: 'team-member/:id',
        name: 'TeamMemberDetail',
        component: () => import('@/views/team/member-info.vue')
      },
      {
        path: 'apply-list',
        name: 'ApplyList',
        component: () => import('@/views/team/apply-list.vue'),
        meta: {
          title: '申请管理'
        }
      },
      {
        path: 'select-team',
        name: 'SelectTeam',
        component: () => import('@/views/team/select-team.vue'),
        meta: {
          title: '选择部门'
        }
      },
      {
        path: 'select-team/:id',
        name: 'SelectTeamDetail',
        component: () => import('@/views/team/select-team.vue'),
        meta: {
          title: '选择部门'
        }
      },
      {
        path: 'search-team',
        name: 'SearchTeam',
        component: () => import('@/views/team/search-team.vue'),
        meta: {
          title: '搜索团队'
        }
      },
      {
        path: 'join-team',
        name: 'JoinTeam',
        component: () => import('@/views/team/join-team/join-team.vue'),
        meta: {
          title: '加入团队'
        }
      },
      {
        path: 'choose-join',
        name: 'ChooseJoin',
        component: () => import('@/views/team/join-team/choose-join-method.vue'),
        meta: {
          title: '选择加入方式'
        }
      },
      {
        path: 'search-join',
        name: 'SearchJoin',
        component: () => import('@/views/team/join-team/search-join.vue')
      },
      {
        path: 'team-info',
        name: 'TeamInfo',
        component: () => import('@/views/team/team-info/team-info.vue'),
        meta: {
          title: '完善团队信息'
        }
      },
      {
        path: 'team-name',
        name: 'TeamName',
        component: () => import('@/views/team/team-info/team-name.vue'),
        meta: {
          title: '团队名称'
        }
      },
      {
        path: 'team-description',
        name: 'TeamDescription',
        component: () => import('@/views/team/team-info/team-description.vue'),
        meta: {
          title: '团队描述'
        }
      },
      {
        path: 'team-avator',
        name: 'TeamAvator',
        component: () => import('@/views/team/team-info/team-avator.vue'),
        meta: {
          title: '团队头像'
        }
      },
      {
        path: 'my-info',
        name: 'Myinfo',
        component: () => import('@/views/team/team-info/my-info.vue'),
        meta: {
          title: '我的信息'
        }
      },
      {
        path: 'join-create',
        name: 'JoinCreate',
        component: () => import('@/views/team/join-create.vue'),
        meta: {
          title: '加入或创建团队'
        }
      },
      {
        path: 'confirm-join',
        name: 'ConfirmJoin',
        component: () => import('@/views/team/join-team/confirm-join.vue'),
        meta: {
          title: '加入团队'
        }
      },
      {
        path: 'import',
        name: 'Import',
        component: () => import('@/views/team/import.vue'),
        meta: {
          title: '批量导入'
        }
      },
      {
        path: 'selector',
        name: 'Selector',
        component: () => import('@/views/team/selector.vue'),
        meta: {
          title: '选择成员'
        }
      }
    ]
  }
]
