import { useEffect } from 'react'; import { X, Loader2 } from 'lucide-react'; import './ProgressModal.css'; interface ProgressModalProps { isOpen: boolean; onClose: () => void; title: string; message?: string; progress?: { current: number; total: number; }; taskId?: string; } export function ProgressModal({ isOpen, onClose, title, message, progress, taskId }: ProgressModalProps) { useEffect(() => { if (isOpen) { document.body.style.overflow = 'hidden'; } else { document.body.style.overflow = ''; } return () => { document.body.style.overflow = ''; }; }, [isOpen]); if (!isOpen) return null; const progressPercent = progress ? Math.round((progress.current / progress.total) * 100) : 0; return (
e.stopPropagation()}>

{title}

{message &&

{message}

} {progress && (
{progress.current} of {progress.total} pages
)} {!progress && (
)} {taskId && (

Task ID: {taskId}

)}
); }