import { FileIcon, XIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import type { AttachmentItem, DisplayMode } from "./types"; interface AttachmentCardProps { /** Unified attachment item (uploaded or local file) */ item: AttachmentItem; mode: DisplayMode; onRemove?: () => void; onClick?: () => void; className?: string; showThumbnail?: boolean; } /** * Unified attachment card component for all file types * Renders differently based on mode (edit/view) and file category */ const AttachmentCard = ({ item, mode, onRemove, onClick, className, showThumbnail = true }: AttachmentCardProps) => { const { category, filename, thumbnailUrl, sourceUrl } = item; const isMedia = category === "image" || category === "video"; // Editor mode - compact badge style with optional thumbnail if (mode === "edit") { return (