import { motion } from 'framer-motion'; import { Loader2, FileImage, FileVideo, Cpu, Activity, BarChart3, Eye, CheckCircle2 } from 'lucide-react'; import styles from './AnalysisProgress.module.css'; const STAGE_ICONS = { upload: FileImage, preprocess: Cpu, inference: Activity, gradcam: Eye, fft: BarChart3, temporal: FileVideo, verdict: CheckCircle2, }; const SKELETONS = Array.from({ length: 3 }); export default function AnalysisProgress({ phase, currentStage, progress, file }) { const isVideo = file?.type?.startsWith('video/'); const StageIcon = currentStage ? (STAGE_ICONS[currentStage.id] || Cpu) : Cpu; return (
{/* Header */}

Forensic Analysis in Progress

{file?.name}

{progress}%
{/* Progress bar */}
{/* Current stage */} {currentStage && (
{currentStage.label}
)} {/* Skeleton preview */}
{/* Media skeleton */}
{/* Verdict skeleton */}
{SKELETONS.map((_, i) => (
))}
{/* Models running */}

Models running

{['EfficientNet-B4', 'Xception', 'ViT Forensic', ...(isVideo ? ['Temporal CNN'] : [])].map((m, i) => (
{m}
))}
); }