import { Badge } from '@/components/ui/badge';

const statusConfig: Record<string, { label: string; className: string }> = {
  sent: { label: '已发送', className: 'bg-emerald-100 text-emerald-700 border-emerald-200' },
  skipped: { label: '已跳过', className: 'bg-gray-100 text-gray-700 border-gray-200' },
  error: { label: '失败', className: 'bg-red-100 text-red-700 border-red-200' },
  unknown: { label: '未知', className: 'bg-amber-100 text-amber-700 border-amber-200' },
};

export function StatusBadge({ status }: { status: string }) {
  const config = statusConfig[status] || statusConfig.unknown;
  return <Badge variant="outline" className={`whitespace-nowrap w-14 justify-center ${config.className}`}>{config.label}</Badge>;
}
