// Overseerr media.status codes:
// 1=Unknown, 2=Pending, 3=Processing, 4=Partially Available, 5=Available
const LABEL: Record<number, string> = {
  1: "Unknown",
  2: "Pending",
  3: "Processing",
  4: "Partial",
  5: "Available",
};

const COLOR: Record<number, string> = {
  1: "bg-slate-700/30 text-slate-500 border-slate-600/40",
  2: "bg-yellow-500/15 text-yellow-400 border-yellow-700/40",
  3: "bg-blue-500/15 text-blue-400 border-blue-700/40",
  4: "bg-cyan-500/15 text-cyan-400 border-cyan-700/40",
  5: "bg-green-500/15 text-green-400 border-green-700/40",
};

export default function StatusBadge({ status }: { status: number }) {
  return (
    <span
      className={`inline-flex items-center rounded border px-1.5 py-0.5 text-xs font-medium ${
        COLOR[status] ?? "bg-slate-700 text-slate-400 border-slate-600"
      }`}
    >
      {LABEL[status] ?? `Status ${status}`}
    </span>
  );
}
