import { Badge } from "./badge";
import type { ParticipantStatus } from "@/features/admin/participants/services/api";

const map: Record<ParticipantStatus, { label: string; tone: "neutral" | "success" | "warning" | "danger" | "accent" }> = {
  in_progress: { label: "In progress", tone: "accent" },
  completed: { label: "Completed", tone: "success" },
  abandoned: { label: "Abandoned", tone: "neutral" },
  unlocked: { label: "Unlocked", tone: "warning" },
};

export function ParticipantStatusBadge({ status }: { status: ParticipantStatus }) {
  const cfg = map[status];
  return <Badge tone={cfg.tone}>{cfg.label}</Badge>;
}