# XWUIMailRow

A single row in a mail list: an optional selection checkbox, a star/unstar toggle button (`★`/`☆`), a sender avatar via `XWUIDisplayPersonChip` (`avatarOnly`), a body column with the sender name, subject, and optional snippet, plus a thread-count badge (when `data.messageCount > 1`) and a `📎` attachment marker (when `data.hasAttachments`). It reads `data` props `sender`, `subject`, `snippet`, `unread`, `starred`, `hasAttachments`, and `messageCount`, and is tuned by `conf_comp` `density` (`comfortable`/`compact`), `selectable`, and `selected`. Click, Enter-key, star-toggle, and selection are surfaced through the `onClick()`, `onStarToggle()`, and `onSelect()` subscriber methods. It is the list-item primitive composed by `XWUIInbox`.

## Usage

```ts
import { XWUIMailRow } from '@exonware/xwui/industry/email';

const row = new XWUIMailRow(
  document.getElementById('app')!,
  {
    id: 'm1',
    sender: { id: 'u-alex', name: 'Alex Rivera' },
    subject: 'Q1 strategy review',
    snippet: 'Sarah - can you review the timeline I added?',
    timestamp: Date.now(),
    unread: true,
    starred: false,
    hasAttachments: true,
    messageCount: 3,
  },
  { density: 'comfortable', selectable: true },
);
row.onClick(() => console.log('open message m1'));
```

## Basic Usage

A single unread mail row with sender, subject, and snippet.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A single unread mail row with sender, subject, and snippet.
```

## Compact + selectable

Dense layout with a selection checkbox, starred state, and attachment marker.

```example
file: examples/CompactSelectable.ts
html: examples/CompactSelectable.html
title: Compact + selectable
description: Dense layout with a selection checkbox, starred state, and attachment marker.
```

## Thread with message count

A conversation row showing a thread-count badge for multiple messages.

```example
file: examples/ThreadCount.ts
html: examples/ThreadCount.html
title: Thread with message count
description: A conversation row showing a thread-count badge for multiple messages.
```

```api
```
