import type { Attachment } from '@/lib/attachments'; import { CodeBlock } from '@/components/CodeBlock'; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; interface Props { attachment: Attachment | null; onClose: () => void; } export function AttachmentPreviewModal({ attachment, onClose }: Props) { const title = attachment ? attachment.kind === 'lines' && attachment.range ? `${attachment.filename}:${attachment.range[0]}-${attachment.range[1]}` : attachment.filename : ''; return ( onClose()}> {title} {attachment && ( )} ); }