import { useState } from "react";
import { Shield, ShieldCheck, Loader2, X, XCircle } from "lucide-react";
// ── Props ──────────────────────────────────────────────────────────
interface ResolveDisputeModalProps {
isSubmitting: boolean;
onSubmit: (targetTeam: "red" | "blue", notes: string) => void;
onClose: () => void;
}
// ── Component ──────────────────────────────────────────────────────
export default function ResolveDisputeModal({
isSubmitting,
onSubmit,
onClose,
}: ResolveDisputeModalProps) {
const [targetTeam, setTargetTeam] = useState<"red" | "blue" | null>(null);
const [notes, setNotes] = useState("");
const canSubmit = targetTeam !== null && !isSubmitting;
return (
{/* Header */}
{/* Body */}
You're agreeing that this test needs rework. Instead of restarting from scratch,
pick which team's work is actually the problem — the test goes straight back to
their queue and the other team's work is left untouched.
Send back to
setTargetTeam("red")}
className={`flex flex-1 items-center justify-center gap-2 rounded-lg border p-3 text-sm font-medium transition-colors ${
targetTeam === "red"
? "border-orange-500 bg-orange-500/10 text-orange-400"
: "border-gray-700 bg-gray-800 text-gray-400 hover:border-gray-600"
}`}
>
Red Team Queue
setTargetTeam("blue")}
className={`flex flex-1 items-center justify-center gap-2 rounded-lg border p-3 text-sm font-medium transition-colors ${
targetTeam === "blue"
? "border-indigo-500 bg-indigo-500/10 text-indigo-400"
: "border-gray-700 bg-gray-800 text-gray-400 hover:border-gray-600"
}`}
>
Blue Team Queue
Notes (optional)
{/* Footer */}
Cancel
targetTeam && onSubmit(targetTeam, notes)}
disabled={!canSubmit}
className="flex items-center gap-1.5 rounded-lg bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-500 disabled:opacity-50 transition-colors"
>
{isSubmitting && }
Confirm Rejection
);
}