"use client"; import { memo } from "react"; import { IconFile, IconX } from "@tabler/icons-react"; import { cn } from "@/lib/utils"; import { formatBytes, type FileAttachment } from "./file-attachment"; type FileAttachmentPreviewProps = { attachments: FileAttachment[]; onRemove: (id: string) => void; disabled?: boolean; }; export const FileAttachmentPreview = memo(function FileAttachmentPreview({ attachments, onRemove, disabled = false, }: FileAttachmentPreviewProps) { if (attachments.length === 0) return null; return (