"use client" import * as React from "react" import { Download02Icon, FileIcon, TrashIcon } from "../icons-v2-generated" import { cn } from "../../utils/cn" import { SquareAvatar } from "./square-avatar" export interface TicketAttachment { id: string fileName: string fileSize: string thumbnailSrc?: string onDownload?: () => void /** When set, a trash button is rendered before the download button. */ onDelete?: () => void } export interface TicketAttachmentsListProps { attachments: TicketAttachment[] className?: string /** `compact` shrinks padding / icon / text / download-button for * in-message rendering (the ticket conversation feed). Default keeps the * roomier full-row layout for any other surface. */ size?: 'default' | 'compact' } export function TicketAttachmentsList({ attachments, className, size = 'default' }: TicketAttachmentsListProps) { if (attachments.length === 0) return null const compact = size === 'compact' return (
{attachment.fileName}
{attachment.fileSize && ({attachment.fileSize}
)}