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

import type { YesNo } from "./schema";

const yesNoStyles: Record<YesNo, string> = {
  yes: "bg-sky-100 text-sky-900",
  no: "bg-muted text-muted-foreground",
};

export function YesNoBadge({ value, label }: { value: YesNo; label: string }) {
  return (
    <span
      className={cn(
        "inline-flex rounded px-2 py-0.5 font-medium text-[11px] capitalize",
        yesNoStyles[value],
      )}
    >
      {label}
    </span>
  );
}
