/**
 * @description router全局配置，如有必要可分文件抽离，其中asyncRoutes只有在intelligence模式下才会用到，pro版只支持remixIcon图标，具体配置请查看vip群文档
 */
const List = [
  {
    path: '/',
    name: 'Root',
    component: 'Layout',
    meta: {
      title: '首页',
      icon: 'home-2-line',
      breadcrumbHidden: true,
    },
    children: [
      {
        path: 'index',
        name: 'Index',
        component: '@/views/index',
        meta: {
          title: '首页',
          icon: 'home-2-line',
          noClosable: true,
        },
      },
    ],
  },
  {
    path: '/test',
    name: 'Test',
    component: 'Layout',
    meta: {
      title: '测试',
      icon: 'user-settings-line',
    },
    children: [
      {
        path: 'testIndex',
        name: 'TestIndex',
        // component: '@/views/setting/personalCenter',
        component: '@/views/test/index',
        meta: {
          title: '测试',
          icon: 'map-pin-user-line',
        },
      },
    ],
  },
  {
    path: '/setting',
    name: 'PersonnelManagement',
    component: 'Layout',
    meta: {
      title: '配置',
      icon: 'user-settings-line',
    },
    children: [
      {
        path: 'personalCenter',
        name: 'PersonalCenter',
        // component: '@/views/setting/personalCenter',
        component: '@/views/system/personal',
        meta: {
          title: '个人中心',
          icon: 'map-pin-user-line',
        },
      },
      {
        path: 'userManagement',
        name: 'UserManagement',
        // component: '@/views/setting/userManagement',
        component: '@/views/system/user',
        meta: {
          title: '用户管理',
          icon: 'user-3-line',
        },
      },
      {
        path: 'roleManagement',
        name: 'RoleManagement',
        // component: '@/views/setting/roleManagement',
        component: '@/views/system/role',
        meta: {
          title: '角色管理',
          icon: 'admin-line',
        },
      },
      {
        path: 'departmentManagement',
        name: 'DepartmentManagement',
        // component: '@/views/setting/departmentManagement',
        component: '@/views/system/dept',
        meta: {
          title: '部门管理',
          icon: 'group-line',
        },
      },
      {
        path: 'menuManagement',
        name: 'MenuManagement',
        // component: '@/views/setting/menuManagement',
        component: '@/views/system/menu',
        meta: {
          title: '菜单管理',
          icon: 'menu-2-fill',
        },
      },
      {
        path: 'systemLog',
        name: 'SystemLog',
        // component: '@/views/setting/systemLog',
        component: '@/views/system/log',
        meta: {
          title: '系统日志',
          icon: 'file-shield-2-line',
        },
      },
    ],
  },
]

module.exports = [
  {
    url: '/router/getList',
    type: 'get',
    response() {
      return {
        code: 200,
        msg: 'success',
        data: { list: List },
      }
    },
  },
  {
    url: '/menuManagement/getList',
    type: 'get',
    response() {
      return {
        code: 200,
        msg: 'success',
        data: {
          list: [
            {
              id: 'root',
              label: '全部角色',
              children: [
                {
                  id: '610000201008234560',
                  permission: 'admin',
                  label: 'admin角色',
                },
                {
                  id: '450000200912071734',
                  permission: 'editor',
                  label: 'editor角色',
                },
              ],
            },
          ],
        },
      }
    },
  },
]
