import { Badge } from "@/components/ui/badge"
import { cn } from "@/lib/utils"
import { PAYMENT_STATUS_CONFIG, type PaymentStatus } from "./statusConfig"

export function OrderPaymentBadge({ status }: { status: string }) {
  const config = PAYMENT_STATUS_CONFIG[status as PaymentStatus]

  if (!config) {
    return <span className="text-xs text-muted-foreground">{status}</span>
  }

  return (
    <Badge variant={config.variant} className={cn(config.className)}>
      {config.label}
    </Badge>
  )
}
