import * as React from 'react' import { Clock, RefreshCw } from 'lucide-react' export interface QueueStatus { pending: number processing: number completed: number failed: number } export interface EnrichmentProgressProps { queueStatus: QueueStatus | null isLoading?: boolean onRefresh?: () => void } const STATUS_ITEMS: Array<{ key: keyof QueueStatus label: string color: string }> = [ { key: 'pending', label: 'Pending', color: 'text-yellow-600' }, { key: 'processing', label: 'Processing', color: 'text-blue-600' }, { key: 'completed', label: 'Completed', color: 'text-green-600' }, { key: 'failed', label: 'Failed', color: 'text-red-600' }, ] export function EnrichmentProgress({ queueStatus, isLoading = false, onRefresh, }: EnrichmentProgressProps) { if (!queueStatus) { return (

Queue status unavailable

) } return (
{onRefresh && (
)}
{STATUS_ITEMS.map(({ key, label, color }) => (
{queueStatus[key]}
{label}
))}
) }