import { EnterpriseManagement } from '../config/EnterpriseManagement';
import { EnterpriseAudit } from '../config/EnterpriseAudit';
import { AuditHistory } from '../config/AuditHistory';
import { EnterpriseInfo } from '../config/EnterpriseInfo';
import { UserManagement } from '../config/UserManagement';
import { DepartmentManagement } from '../config/DepartmentManagement';
import { EmployeeManagement } from '../config/EmployeeManagement';
import { RoleManagement } from '../config/RoleManagement';
import { MenuManagement } from '../config/MenuManagement';
import { PermissionManagement } from '../config/PermissionManagement';
import { SystemSettings } from '../config/SystemSettings';
import { CategoryDictionary } from '../config/CategoryDictionary';
import { DataDictionary } from '../config/DataDictionary';
import { LoginLog } from '../config/LoginLog';
import { OperationLog } from '../config/OperationLog';
import { PerformanceMonitor } from '../config/PerformanceMonitor';
import { NetworkLog } from '../config/NetworkLog';
import { MessageTemplate } from '../config/MessageTemplate';
import { MessageSend } from '../config/MessageSend';
import { MessageLog } from '../config/MessageLog';
import { PersonalInfo } from '../config/PersonalInfo';
import { AccountSecurity } from '../config/AccountSecurity';

interface ConfigManagementProps {
  activePath: string;
}

export function ConfigManagement({ activePath }: ConfigManagementProps) {
  const renderContent = () => {
    switch (activePath) {
      // 租户管理
      case '/config/tenant/enterprise-management':
        return <EnterpriseManagement />;
      case '/config/tenant/enterprise-audit':
        return <EnterpriseAudit />;
      case '/config/tenant/audit-history':
        return <AuditHistory />;
      case '/config/tenant/enterprise-info':
        return <EnterpriseInfo />;
      case '/config/tenant/user-management':
        return <UserManagement />;
      // 用户管理
      case '/config/user/department':
        return <DepartmentManagement />;
      case '/config/user/employee':
        return <EmployeeManagement />;
      case '/config/user/role':
        return <RoleManagement />;
      case '/config/user/menu':
        return <MenuManagement />;
      case '/config/user/permission':
        return <PermissionManagement />;
      // 系统参数
      case '/config/system/settings':
        return <SystemSettings />;
      case '/config/system/category':
        return <CategoryDictionary />;
      case '/config/system/dictionary':
        return <DataDictionary />;
      // 系统监控
      case '/config/monitor/login-log':
        return <LoginLog />;
      case '/config/monitor/operation-log':
        return <OperationLog />;
      case '/config/monitor/performance':
        return <PerformanceMonitor />;
      case '/config/monitor/network-log':
        return <NetworkLog />;
      // 消息中心
      case '/config/message/send':
        return <MessageSend />;
      case '/config/message/template':
        return <MessageTemplate />;
      case '/config/message/log':
        return <MessageLog />;
      // 个人中心
      case '/config/profile/info':
        return <PersonalInfo />;
      case '/config/profile/security':
        return <AccountSecurity />;
      default:
        return <PersonalInfo />;
    }
  };

  return renderContent();
}
