import { STATUS_COLORS, statusLabel, type SaleStatus } from "./sale-status";
import { useLanguage } from "@/hooks/use-language";

export function SaleStatusBadge({ status, className = "" }: { status: string; className?: string }) {
  const { lang } = useLanguage();
  const isBn = lang === "bn";
  const cls = STATUS_COLORS[status as SaleStatus] || "bg-muted text-muted-foreground border-border";
  return (
    <span
      className={`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold ${cls} ${className}`}
    >
      {statusLabel(status, isBn)}
    </span>
  );
}
