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

const COMPANY_COLORS: Record<string, string> = {
  ECC: "border-blue-200 bg-blue-50 text-blue-700",
  NCC: "border-emerald-200 bg-emerald-50 text-emerald-700",
  SCII: "border-violet-200 bg-violet-50 text-violet-700",
  SMC: "border-slate-200 bg-slate-100 text-slate-700",
};

export function CompanyPill({ code, className }: { code: string; className?: string }) {
  const style = COMPANY_COLORS[code] ?? COMPANY_COLORS.SMC;
  return (
    <span
      className={cn(
        "inline-flex items-center rounded-md border px-1.5 py-0.5 font-mono text-[10px] font-semibold tracking-wide",
        style,
        className
      )}
    >
      {code}
    </span>
  );
}
