import { OperationPlanning } from '../operation/OperationPlanning';
import { OperationTask } from '../operation/OperationTask';
import { OperationExecution } from '../operation/OperationExecution';
import { OperationCalendar } from '../operation/OperationCalendar';
import { OperationArchive } from '../operation/OperationArchive';
import { OperationKnowledge } from '../operation/OperationKnowledge';
import { OperationPerformance } from '../operation/OperationPerformance';
import { OperationIssue } from '../operation/OperationIssue';

interface OperationManagementProps {
  activePath: string;
}

export function OperationManagement({ activePath }: OperationManagementProps) {
  const renderContent = () => {
    switch (activePath) {
      // 农事计划
      case '/operation/planning/creation':
      case '/operation/planning/allocation':
      case '/operation/planning/progress':
        return <OperationPlanning activePath={activePath} />;
      // 农事任务
      case '/operation/task/management':
      case '/operation/task/assignment':
      case '/operation/task/monitoring':
      case '/operation/task/statistics':
        return <OperationTask activePath={activePath} />;
      // 农事执行
      case '/operation/execution/type':
      case '/operation/execution/record':
      case '/operation/execution/log':
        return <OperationExecution activePath={activePath} />;
      // 农事日历
      case '/operation/calendar/view':
      case '/operation/calendar/gantt':
      case '/operation/calendar/progress':
        return <OperationCalendar activePath={activePath} />;
      // 农事档案
      case '/operation/archive/aggregation':
      case '/operation/archive/view':
      case '/operation/archive/trace':
        return <OperationArchive activePath={activePath} />;
      // 农事知识库
      case '/operation/knowledge/management':
      case '/operation/knowledge/category':
      case '/operation/knowledge/search':
        return <OperationKnowledge activePath={activePath} />;
      // 绩效管理
      case '/operation/performance/staff':
      case '/operation/performance/hours':
      case '/operation/performance/statistics':
      case '/operation/performance/schedule':
        return <OperationPerformance activePath={activePath} />;
      // 农事问题协同
      case '/operation/issue/report':
      case '/operation/issue/assign':
      case '/operation/issue/collaborate':
        return <OperationIssue activePath={activePath} />;
      default:
        return <OperationPlanning activePath={activePath} />;
    }
  };

  return renderContent();
}
