"use client"; import { cn } from "@/lib/utils"; interface ProgressCardProps { title: string; current: number; total: number; subtitle?: string; status?: "running" | "complete" | "failed" | "idle"; } export function ProgressCard({ title, current, total, subtitle, status = "running" }: ProgressCardProps) { const pct = total > 0 ? Math.round((current / total) * 100) : 0; return (

{title}

{subtitle &&

{subtitle}

}
{current.toLocaleString()} / {total.toLocaleString()} {pct}%
); } export function StatusBadge({ status }: { status: string }) { const config: Record = { running: { label: "Running", color: "bg-blue-500/10 text-blue-400 border-blue-500/20", dot: "bg-blue-400 animate-pulse" }, complete: { label: "Complete", color: "bg-green-500/10 text-green-400 border-green-500/20", dot: "bg-green-400" }, failed: { label: "Failed", color: "bg-red-500/10 text-red-400 border-red-500/20", dot: "bg-red-400" }, pending: { label: "Pending", color: "bg-yellow-500/10 text-yellow-400 border-yellow-500/20", dot: "bg-yellow-400" }, idle: { label: "Idle", color: "bg-gray-500/10 text-gray-400 border-gray-500/20", dot: "bg-gray-400" }, }; const c = config[status] || config.idle; return ( {c.label} ); }