import { Loader2, Upload, X } from "lucide-react";
import { useState } from "react";
import { useTranslation } from "@/contexts/i18n-context";
import { useFileStore } from "@/stores/file-store";
interface ProgressCardProps {
active: boolean;
phase: "uploading" | "processing" | "complete";
label: string;
stage?: string;
percent: number;
elapsed: number;
}
export function ProgressCard({ active, phase, label, stage, percent, elapsed }: ProgressCardProps) {
const { t } = useTranslation();
const activeJobId = useFileStore((s) => s.activeJobId);
const cancelCurrentJob = useFileStore((s) => s.cancelCurrentJob);
const [canceling, setCanceling] = useState(false);
if (!active) return null;
const icon =
phase === "uploading" ? (