export function TaskRoutingSection() {
  return (
    <div className="space-y-4">
      <p className="text-gray-600 mb-4">
        Der Task Router entscheidet, welcher Agent eine Anfrage bearbeitet. Er verwendet
        Intent-basierte Regeln mit Prioritaeten und Fallback-Ketten.
      </p>

      <div className="overflow-x-auto">
        <table className="min-w-full border border-gray-200 rounded-lg">
          <thead className="bg-gray-50">
            <tr>
              <th className="px-4 py-2 text-left text-sm font-medium text-gray-900">Intent-Pattern</th>
              <th className="px-4 py-2 text-left text-sm font-medium text-gray-900">Ziel-Agent</th>
              <th className="px-4 py-2 text-left text-sm font-medium text-gray-900">Prioritaet</th>
              <th className="px-4 py-2 text-left text-sm font-medium text-gray-900">Fallback</th>
            </tr>
          </thead>
          <tbody className="divide-y divide-gray-200">
            <tr>
              <td className="px-4 py-2 text-sm font-mono text-blue-700">learning_*</td>
              <td className="px-4 py-2 text-sm text-gray-700">TutorAgent</td>
              <td className="px-4 py-2 text-sm text-gray-700">10</td>
              <td className="px-4 py-2 text-sm text-gray-500">Orchestrator</td>
            </tr>
            <tr>
              <td className="px-4 py-2 text-sm font-mono text-blue-700">help_*, question_*</td>
              <td className="px-4 py-2 text-sm text-gray-700">TutorAgent</td>
              <td className="px-4 py-2 text-sm text-gray-700">8</td>
              <td className="px-4 py-2 text-sm text-gray-500">Orchestrator</td>
            </tr>
            <tr>
              <td className="px-4 py-2 text-sm font-mono text-green-700">grade_*, evaluate_*</td>
              <td className="px-4 py-2 text-sm text-gray-700">GraderAgent</td>
              <td className="px-4 py-2 text-sm text-gray-700">10</td>
              <td className="px-4 py-2 text-sm text-gray-500">Orchestrator</td>
            </tr>
            <tr>
              <td className="px-4 py-2 text-sm font-mono text-amber-700">quality_*, review_*</td>
              <td className="px-4 py-2 text-sm text-gray-700">QualityJudge</td>
              <td className="px-4 py-2 text-sm text-gray-700">10</td>
              <td className="px-4 py-2 text-sm text-gray-500">GraderAgent</td>
            </tr>
            <tr>
              <td className="px-4 py-2 text-sm font-mono text-red-700">alert_*, monitor_*</td>
              <td className="px-4 py-2 text-sm text-gray-700">AlertAgent</td>
              <td className="px-4 py-2 text-sm text-gray-700">10</td>
              <td className="px-4 py-2 text-sm text-gray-500">Orchestrator</td>
            </tr>
            <tr className="bg-gray-50">
              <td className="px-4 py-2 text-sm font-mono text-gray-500">* (alle anderen)</td>
              <td className="px-4 py-2 text-sm text-gray-700">Orchestrator</td>
              <td className="px-4 py-2 text-sm text-gray-700">0</td>
              <td className="px-4 py-2 text-sm text-gray-500">-</td>
            </tr>
          </tbody>
        </table>
      </div>

      <div className="mt-6 grid grid-cols-1 md:grid-cols-2 gap-4">
        <div className="bg-white border border-gray-200 rounded-xl p-4">
          <h4 className="font-semibold text-gray-900 mb-2">Routing-Strategien</h4>
          <ul className="text-sm text-gray-600 space-y-2">
            <li><span className="font-mono text-blue-600">ROUND_ROBIN</span> - Gleichmaessige Verteilung</li>
            <li><span className="font-mono text-blue-600">LEAST_LOADED</span> - Agent mit wenigsten Tasks</li>
            <li><span className="font-mono text-blue-600">PRIORITY</span> - Hoechste Prioritaet zuerst</li>
            <li><span className="font-mono text-blue-600">RANDOM</span> - Zufaellige Auswahl</li>
          </ul>
        </div>
        <div className="bg-white border border-gray-200 rounded-xl p-4">
          <h4 className="font-semibold text-gray-900 mb-2">Fallback-Verhalten</h4>
          <ul className="text-sm text-gray-600 space-y-2">
            <li>1. Versuche Ziel-Agent zu erreichen</li>
            <li>2. Bei Timeout: Fallback-Agent nutzen</li>
            <li>3. Bei Fehler: Orchestrator uebernimmt</li>
            <li>4. Bei kritischen Fehlern: Alert an Admin</li>
          </ul>
        </div>
      </div>
    </div>
  )
}
