import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

export const UserRoute: RouteRecordRaw = {
  path: '/system/user',
  component: Layout,
  meta: { title: '用户管理', icon: 'i-ri:user-settings-line' },
  children: [{
    path: '',
    name: 'sysUserList',
    component: () => import('@/views/sys/user/list.vue'),
    meta: { title: '用户管理' },
  }],
}

export const RoleRoute: RouteRecordRaw = {
  path: '/system/role',
  component: Layout,
  meta: { title: '角色管理', icon: 'i-ri:shield-user-line' },
  children: [{
    path: '',
    name: 'sysRoleList',
    component: () => import('@/views/sys/role/list.vue'),
    meta: { title: '角色管理' },
  }],
}

export const DeptRoute: RouteRecordRaw = {
  path: '/system/dept',
  component: Layout,
  meta: { title: '部门管理', icon: 'i-ri:organization-chart' },
  children: [{
    path: '',
    name: 'sysDeptList',
    component: () => import('@/views/sys/dept/list.vue'),
    meta: { title: '部门管理' },
  }],
}

export const MenuRoute: RouteRecordRaw = {
  path: '/system/menu',
  component: Layout,
  meta: { title: '菜单管理', icon: 'i-ri:menu-line' },
  children: [{
    path: '',
    name: 'sysMenuList',
    component: () => import('@/views/sys/menu/list.vue'),
    meta: { title: '菜单管理' },
  }],
}
