import { cn } from "@/lib/utils/cn";

const STATUS_STYLES: Record<string, string> = {
  completed: "bg-success-bg text-success",
  in_progress: "bg-warning-bg text-warning",
  abandoned: "bg-danger-bg text-danger",
};

interface RespondentStatusPillProps {
  status: string;
}

export function RespondentStatusPill({ status }: RespondentStatusPillProps) {
  return (
    <span
      className={cn(
        "inline-flex rounded-full px-2.5 py-1 text-[11.5px] font-bold capitalize",
        STATUS_STYLES[status] ?? "bg-bg text-muted"
      )}
    >
      {status.replace("_", " ")}
    </span>
  );
}
