import type { AppRouteModule } from '/@/router/types'

import { LAYOUT } from '/@/router/constant'
import { RoleEnum } from '/@/enums/roleEnum'

const manager: AppRouteModule = {
  path: '/manager',
  name: 'Manager',
  component: LAYOUT,
  redirect: '/manager/staff-list',
  meta: {
    title: '后台用户',
    icon: 'fa-solid:user-cog',
    roles: [RoleEnum.ADMIN, RoleEnum.SHOWSTAFF, RoleEnum.SHOWPERMISSION]
  },
  children: [
    {
      path: 'staff-list',
      name: 'ManagerList',
      component: () => import('/@/views/manager/user/list/index.vue'),
      meta: {
        title: '用户列表',
        roles: [RoleEnum.ADMIN, RoleEnum.SHOWSTAFF]
      }
    },
    // {
    //   path: 'staff-detail/:id',
    //   name: 'ManagerDetail',
    //   component: () => import('/@/views/manager/user/detail/index.vue'),
    //   meta: {
    //     title: '用户详情'
    //   }
    // },
    {
      path: 'perm-list',
      name: 'PermList',
      component: () => import('/@/views/manager/permission/index.vue'),
      meta: {
        title: '权限组',
        roles: [RoleEnum.ADMIN, RoleEnum.SHOWPERMISSION]
      }
    }
  ]
}

export default manager
