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

type BadgeVariant = "default" | "success" | "warning" | "danger" | "info" | "brand";

const VARIANTS: Record<BadgeVariant, string> = {
  default: "bg-slate-100 text-slate-600 border-slate-200",
  success: "bg-green-50 text-green-700 border-green-200",
  warning: "bg-amber-50 text-amber-700 border-amber-200",
  danger: "bg-red-50 text-red-700 border-red-200",
  info: "bg-blue-50 text-blue-700 border-blue-200",
  brand: "bg-brand-50 text-brand-700 border-brand-200",
};

interface Props { children: React.ReactNode; variant?: BadgeVariant; className?: string }

export function Badge({ children, variant = "default", className }: Props) {
  return (
    <span className={cn("inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider border", VARIANTS[variant], className)}>
      {children}
    </span>
  );
}
