import React, { useState, useEffect } from 'react'; import type { AgentReview, SubReview, RagStatus, OverallStatus } from '../types'; import { CheckCircleIcon, ExclamationTriangleIcon, InformationCircleIcon } from './icons/StatusIcons'; import { FlagIcon } from './icons/FlagIcon'; import { XIcon } from './icons/XIcon'; import { BugIcon } from './icons/BugIcon'; import { ExportIcon } from './icons/ExportIcon'; import { LegalIcon } from './icons/LegalIcon'; const RagStatusBadge: React.FC<{ status: RagStatus; isLarge?: boolean }> = ({ status, isLarge = false }) => { let colorClasses = ''; let iconColor = ''; switch (status) { case 'Red': colorClasses = 'bg-red-50 border-red-200 text-red-800 shadow-red-100'; iconColor = 'text-red-600'; break; case 'Amber': colorClasses = 'bg-amber-50 border-amber-200 text-amber-800 shadow-amber-100'; iconColor = 'text-amber-600'; break; case 'Green': colorClasses = 'bg-emerald-50 border-emerald-200 text-emerald-800 shadow-emerald-100'; iconColor = 'text-emerald-600'; break; case 'Error': colorClasses = 'bg-slate-50 border-slate-200 text-slate-700 shadow-slate-100'; iconColor = 'text-slate-500'; break; } const sizeClasses = isLarge ? 'px-4 py-1.5 text-sm rounded-xl border shadow-sm' : 'px-2.5 py-1 text-xs rounded-lg border shadow-sm'; return (
{status === 'Red' && } {status === 'Amber' && } {status === 'Green' && } {status === 'Error' && } {status}
); }; const ResolveIssueModal: React.FC<{ isOpen: boolean; onClose: () => void; onSubmit: (reason: string) => void; issueText: string; }> = ({ isOpen, onClose, onSubmit, issueText }) => { if (!isOpen) return null; const [reason, setReason] = useState(''); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (reason.trim()) { onSubmit(reason); } }; return (
e.stopPropagation()} >

Resolve Issue

Please provide a reason for manually resolving this issue.

"{issueText}"