import Layout from '@/layout'

const HomeRoutes = {
  path: '/userManagement',
  component: Layout,
  name: 'UserManagement',
  redirect: '/userManagement/role',
  //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
  meta: { title: '权限管理', elSvgIcon: 'Fold' },
  children: [
    {
      path: 'permission',
      name: 'Permission',
      meta: { title: '权限项管理', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/permission/index.vue'),
    },
    {
      path: 'role',
      name: 'Role',
      meta: { title: '角色管理', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/role/index.vue'),
    },
    {
      path: 'account',
      name: 'Account',
      meta: { title: '账号管理', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/account/index.vue'),
    },
    {
      path: 'accountGroup',
      name: 'AccountGroup',
      meta: { title: '账号组管理', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/accountGroup/index.vue'),
    },
    {
      path: 'application',
      name: 'Application',
      meta: { title: '应用管理', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/application/index.vue'),
    },
    {
      path: 'auth',
      name: 'Auth',
      hidden: true,
      meta: { title: '角色授权', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/role/auth.vue'),
    },
    {
      path: 'accountAuth',
      name: 'AccountAuth',
      hidden: true,
      meta: { title: '账号权限', elSvgIcon: 'Fold', icon: 'table' },
      component: () => import('@/views/userManagement/account/auth.vue'),
    },
  ],
}

export default [HomeRoutes]
