import type { ReservationStatus } from "@/lib/reservation-status";
import { RESERVATION_STATUS_LABELS } from "@/lib/reservation-status";
import { cn } from "@/lib/utils";

const STYLES: Record<ReservationStatus, string> = {
  pending: "bg-zinc-500/15 text-zinc-700 border-zinc-200",
  confirmed: "bg-blue-500/15 text-blue-700 border-blue-200",
  reserved: "bg-amber-500/15 text-amber-800 border-amber-200",
  arrived: "bg-sky-500/15 text-sky-700 border-sky-200",
  occupied: "bg-red-500/15 text-red-700 border-red-200",
  completed: "bg-emerald-500/15 text-emerald-700 border-emerald-200",
  cancelled: "bg-zinc-500/15 text-zinc-500 border-zinc-200 line-through",
  no_show: "bg-zinc-500/15 text-zinc-500 border-zinc-200",
};

export function ReservationStatusBadge({ status }: { status: ReservationStatus }) {
  return (
    <span className={cn("rounded-md border px-2 py-0.5 text-xs font-semibold", STYLES[status])}>
      {RESERVATION_STATUS_LABELS[status]}
    </span>
  );
}
