import React from 'react'; import { X, Play, Upload, Layers } from 'lucide-react'; import { Button } from '../ui/button'; import { FilePreviewCard, UploadFile } from './FilePreviewCard'; interface BulkUploadModalProps { files: UploadFile[]; onClose: () => void; onStartUpload: () => void; onCancelFile: (id: string) => void; onPauseFile: (id: string) => void; onResumeFile: (id: string) => void; } export const BulkUploadModal: React.FC = ({ files, onClose, onStartUpload, onCancelFile, onPauseFile, onResumeFile, }) => { const totalProgress = files.reduce((acc, f) => acc + f.progress, 0) / (files.length || 1); const uploadingCount = files.filter((f) => f.status === 'uploading').length; const completedCount = files.filter((f) => f.status === 'completed').length; return (
{/* Header */}

Bulk Upload Manager

{completedCount} / {files.length} files uploaded •{' '} {files.length - completedCount} remaining

{/* Global Progress */}
Overall Progress {Math.round(totalProgress)}%
{/* File List */}
{files.map((file) => ( onCancelFile(file.id)} onPause={() => onPauseFile(file.id)} onResume={() => onResumeFile(file.id)} /> ))}
{/* Footer Actions */}
{uploadingCount === 0 && completedCount < files.length && ( )} {completedCount === files.length && ( )}
); };