"use client"; import { ImageIcon } from "lucide-react"; import type { AttachmentRecord } from "@/lib/types"; interface AttachmentsGridProps { attachments: AttachmentRecord[]; onImageClick?: (index: number) => void; } export function AttachmentsGrid({ attachments, onImageClick, }: AttachmentsGridProps) { if (attachments.length === 0) return null; const images = attachments.filter((a) => a.type?.startsWith("image/")); const others = attachments.filter((a) => !a.type?.startsWith("image/")); return (