import { SALE_PAYMENT_COLORS, salePaymentLabel, type SalePaymentStatus } from "./sale-status";
import { useLanguage } from "@/hooks/use-language";

export function SalePaymentBadge({ status, className = "" }: { status: string; className?: string }) {
  const { lang } = useLanguage();
  const isBn = lang === "bn";
  const cls = SALE_PAYMENT_COLORS[status as SalePaymentStatus] || "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}`}>
      {salePaymentLabel(status, isBn)}
    </span>
  );
}
