import React from 'react'; import { FileItem, UploadStatus } from '../types'; import { FileText, Loader2, Check, AlertCircle, ExternalLink, X } 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})

You can rename the destination path below
{files.map((item) => (
{item.file.name} ({(item.file.size / 1024).toFixed(1)} KB)
{item.status === UploadStatus.IDLE && (
To: onPathChange(item.id, e.target.value)} className="text-xs py-1 px-2 border border-gray-200 rounded bg-white focus:border-yellow-400 outline-none w-full max-w-xs" placeholder="path/to/file.ext" />
)} {item.status === UploadStatus.UPLOADING && ( Processing... )} {item.status === UploadStatus.SUCCESS && ( View on Hub )} {item.status === UploadStatus.ERROR && ( {item.error} )}
{item.status === UploadStatus.UPLOADING && ( )} {item.status === UploadStatus.SUCCESS && (
)} {item.status === UploadStatus.ERROR && (
)} {item.status !== UploadStatus.UPLOADING && item.status !== UploadStatus.SUCCESS && ( )}
))}
); };