/**
 * @description 系统管理模块统一导出入口
 * @author yslg
 * @since 2025-10-07
 */

// 部门管理
export { default as DeptManageView } from './DeptManageView.vue';

// 菜单管理
export { default as MenuManageView } from './MenuManageView.vue';

// 权限管理
export { default as PermissionManageView } from './PermissionManageView.vue';

// 角色管理
export { default as RoleManageView } from './RoleManageView.vue';

// 系统管理模块类型定义
export interface SystemManageModule {
  /** 部门管理组件 */
  DeptManageView: any;
  /** 菜单管理组件 */
  MenuManageView: any;
  /** 权限管理组件 */
  PermissionManageView: any;
  /** 角色管理组件 */
  RoleManageView: any;
}

// 系统管理路由配置
export const systemManageRoutes = [
  {
    path: '/manage/system/dept',
    name: 'DeptManage',
    component: () => import('./DeptManageView.vue'),
    meta: {
      title: '部门管理',
      requiresAuth: true,
      permissions: ['system:dept:manage']
    }
  },
  {
    path: '/manage/system/menu',
    name: 'MenuManage',
    component: () => import('./MenuManageView.vue'),
    meta: {
      title: '菜单管理',
      requiresAuth: true,
      permissions: ['system:menu:manage']
    }
  },
  {
    path: '/manage/system/permission',
    name: 'PermissionManage',
    component: () => import('./PermissionManageView.vue'),
    meta: {
      title: '权限管理',
      requiresAuth: true,
      permissions: ['system:permission:manage']
    }
  },
  {
    path: '/manage/system/role',
    name: 'RoleManage',
    component: () => import('./RoleManageView.vue'),
    meta: {
      title: '角色管理',
      requiresAuth: true,
      permissions: ['system:role:manage']
    }
  }
];

// 系统管理菜单配置
export const systemManageMenus = [
  {
    id: 'system-dept',
    title: '部门管理',
    icon: 'el-icon-office-building',
    path: '/manage/system/dept',
    permissions: ['system:dept:manage']
  },
  {
    id: 'system-menu',
    title: '菜单管理',
    icon: 'el-icon-menu',
    path: '/manage/system/menu',
    permissions: ['system:menu:manage']
  },
  {
    id: 'system-permission',
    title: '权限管理',
    icon: 'el-icon-key',
    path: '/manage/system/permission',
    permissions: ['system:permission:manage']
  },
  {
    id: 'system-role',
    title: '角色管理',
    icon: 'el-icon-user',
    path: '/manage/system/role',
    permissions: ['system:role:manage']
  }
];
