import type { QueueItem } from '@/core/types';
import { Badge } from '@/components/ui/badge';
import {
  Loader2,
  CheckCircle2,
  XCircle,
} from 'lucide-react';

export default function StatusBadge({ status }: { status: QueueItem['status'] }) {
  switch (status) {
    case 'pending':
      return <Badge variant="secondary">Pending</Badge>;
    case 'processing':
      return (
        <Badge variant="default" className="gap-1 bg-blue-500">
          <Loader2 className="w-3 h-3 animate-spin" /> Converting
        </Badge>
      );
    case 'complete':
      return (
        <Badge variant="default" className="gap-1 bg-green-500">
          <CheckCircle2 className="w-3 h-3" /> Done
        </Badge>
      );
    case 'error':
      return (
        <Badge variant="destructive" className="gap-1">
          <XCircle className="w-3 h-3" /> Error
        </Badge>
      );
  }
}