import { formatFileSize } from '@renderer/utils/attachmentUtils'; import { X } from 'lucide-react'; import { AttachmentThumbnail } from './AttachmentThumbnail'; import type { AttachmentPayload } from '@shared/types'; interface AttachmentPreviewItemProps { attachment: AttachmentPayload; onRemove: (id: string) => void; } export const AttachmentPreviewItem = ({ attachment, onRemove, }: AttachmentPreviewItemProps): React.JSX.Element => { const dataUrl = `data:${attachment.mimeType};base64,${attachment.data}`; return (