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

const CLASS: Record<string, string> = {
  pending: 'bg-bone text-forest/70',
  processing: 'bg-amber-100 text-amber-800',
  shipped: 'bg-forest/10 text-forest',
  delivered: 'bg-forest-100 text-forest-800',
  cancelled: 'bg-red-50 text-red-700',
  refunded: 'bg-red-50 text-red-700',
  disputed: 'bg-terracotta/10 text-terracotta',
};

export function OrderStatusBadge({ status }: { status: string }) {
  const label = status.charAt(0).toUpperCase() + status.slice(1);
  return (
    <span
      className={cn(
        'inline-block rounded px-2 py-0.5 text-xs font-medium',
        CLASS[status] ?? 'bg-slate-100 text-slate-600',
      )}
    >
      {label}
    </span>
  );
}
