import { QR_STATUS_LABEL } from "@/lib/labels";

const COLOR: Record<string, string> = {
  valid: "bg-green-50 text-green-700",
  already_used: "bg-kolabora-tertiary/15 text-kolabora-tertiary",
  expired: "bg-kolabora-neutral-dark/10 text-kolabora-neutral-dark/70",
  cancelled: "bg-red-50 text-red-700",
};

export function QrStatusBadge({ status }: { status: string }) {
  return (
    <span className={`rounded-full px-4 py-1.5 text-sm font-semibold ${COLOR[status] ?? COLOR.expired}`}>
      {QR_STATUS_LABEL[status] ?? "INVALID"}
    </span>
  );
}
