import { AlertCircle } from 'lucide-react'; import { AttachmentPreviewItem } from './AttachmentPreviewItem'; import type { AttachmentPayload } from '@shared/types'; interface AttachmentPreviewListProps { attachments: AttachmentPayload[]; onRemove: (id: string) => void; error?: string | null; } export const AttachmentPreviewList = ({ attachments, onRemove, error, }: AttachmentPreviewListProps): React.JSX.Element | null => { if (attachments.length === 0 && !error) return null; return (
{attachments.length > 0 ? (
{attachments.map((att) => ( ))}
) : null} {error ? (

{error}

) : null}
); };