import React from 'react'; import { FileItem, UploadStatus } from '../types'; import { FileText, Loader2, CheckCircle2, AlertTriangle, ExternalLink, X, Edit2 } from 'lucide-react'; interface UploadListProps { files: FileItem[]; onRemove: (id: string) => void; onPathChange: (id: string, newPath: string) => void; } export const UploadList: React.FC = ({ files, onRemove, onPathChange }) => { if (files.length === 0) return null; return (

Upload Queue {files.length}

Auto-saving path changes
{files.map((item) => (
{/* Icon Box */}
{/* File Info & Input */}
{item.file.name} {(item.file.size / 1024).toFixed(1)} KB
{item.status === UploadStatus.IDLE && (
onPathChange(item.id, e.target.value)} className="w-full text-xs py-1.5 pl-2 pr-7 border border-transparent hover:border-gray-200 focus:border-indigo-400 focus:bg-white rounded bg-transparent transition-all outline-none text-gray-600 font-mono" placeholder="path/to/file.ext" />
)} {item.status === UploadStatus.UPLOADING && (
)} {item.status === UploadStatus.SUCCESS && ( View on Hub )} {item.status === UploadStatus.ERROR && ( Error: {item.error} )}
{/* Actions / Status Icons */}
{item.status === UploadStatus.UPLOADING && ( )} {item.status === UploadStatus.SUCCESS && (
Done
)} {item.status === UploadStatus.ERROR && (
Failed
)} {item.status !== UploadStatus.UPLOADING && item.status !== UploadStatus.SUCCESS && ( )}
))}
); };