import { Loader2, Image, Link, X } from 'lucide-react'; import type { Attachment } from './types'; type AttachmentListProps = { attachments: Attachment[]; onRemove: (index: number) => void; }; export function AttachmentList({ attachments, onRemove }: AttachmentListProps) { if (attachments.length === 0) return null; return (
{attachments.map((a, i) => ( {a.loading ? ( ) : a.type === 'image' && a.dataUrl ? ( {a.filename} ) : a.type === 'image' ? ( ) : ( )} {a.type === 'image' ? a.filename : a.loading ? 'Loading...' : a.title} ))}
); }