import React from "react"; import { motion } from "framer-motion"; import { FileSearch, Cpu, TableProperties, CheckCircle2, Loader2, } from "lucide-react"; import { cn } from "@/lib/utils"; const steps = [ { id: "upload", label: "Received", icon: FileSearch }, { id: "analyze", label: "Analysis", icon: Cpu }, { id: "extract", label: "Extraction", icon: TableProperties }, { id: "complete", label: "Done", icon: CheckCircle2 }, ]; export default function ProcessingStatus({ isProcessing, isComplete }) { const getCurrentStep = () => { if (isComplete) return 4; if (isProcessing) return 2; return 0; }; const currentStep = getCurrentStep(); if (!isProcessing && !isComplete) return null; return (
{steps.map((step, index) => { const isActive = index + 1 === currentStep; const isCompleted = index + 1 < currentStep || isComplete; const Icon = step.icon; return (
{(isActive && !isComplete) ? ( ) : isCompleted ? ( ) : ( )}
{index < steps.length - 1 && (
)}
); })}
); }