import { cn } from '@/lib/cn';

type OrderStatus = 'PENDING' | 'PAID' | 'FAILED' | 'EXPIRED';

const TONE: Record<OrderStatus, string> = {
  PAID: 'bg-wood/10 text-wood',
  PENDING: 'bg-earth/10 text-earth',
  FAILED: 'bg-fire/10 text-fire',
  EXPIRED: 'bg-canvas text-muted ring-1 ring-line',
};

export function OrderStatusPill({ status, label }: { status: OrderStatus; label: string }) {
  return (
    <span className={cn('inline-block rounded-full px-2 py-0.5 text-[11px] font-semibold', TONE[status])}>{label}</span>
  );
}
