Renders a bordered list of ticket file attachments with optional thumbnail previews, delete, and download actions.
## Key Components
### Interfaces
- **`TicketAttachment`** — Describes a single attachment entry:
- `id` — Unique identifier
- `fileName` — Display name
- `fileSize` — Human-readable size string
- `thumbnailSrc?` — Optional image preview URL
- `onDownload?` — Callback to trigger file download
- `onDelete?` — When provided, renders a trash button before the download button
- **`TicketAttachmentsListProps`** — Component props:
- `attachments` — Array of `TicketAttachment` objects
- `className?` — Optional wrapper class override
- `size?` — `'default'` (full-row layout) | `'compact'` (reduced padding/icons for in-message rendering)
### Component
- **`TicketAttachmentsList`** — Returns `null` if the attachment array is empty. Renders each attachment as a row with a thumbnail (via `SquareAvatar`) or a generic `FileIcon` fallback, filename, file size, and optional delete/download buttons.
## Usage Example
```typescript
import { TicketAttachmentsList } from "@openframe-oss-lib/components"
const attachments = [
{
id: "att-1",
fileName: "screenshot.png",
fileSize: "142 KB",
thumbnailSrc: "https://cdn.example.com/thumb.png",
onDownload: () => downloadFile("att-1"),
onDelete: () => deleteAttachment("att-1"),
},
{
id: "att-2",
fileName: "report.pdf",
fileSize: "1.2 MB",
onDownload: () => downloadFile("att-2"),
},
]
// Full-row layout (e.g. ticket detail panel)
// Compact layout (e.g. inside a conversation message)
```