# XWUIGameMailUI

An in-game mail client laid out in two columns: a left message list and a right reader pane. The header shows a "Mail" title, an unread-count badge derived from messages where `read` is false, and an optional Compose button (`showCompose`). Each inbox message has `from`, `subject`, `text`, `timestamp` and an `attachments` array; unread and selected items are visually marked, attachment indicators appear when `showAttachments` is enabled, and the `selected` id drives the reader. Wire it up with `onRead` / `onCompose` / `onDelete` callbacks or the `read(id)`, `compose()`, `delete(id)` methods.

## Basic Usage

Constructs the mail UI in `#app` with an empty inbox and the "Select a message to read" placeholder in the reader pane.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A 2-column mail layout with a message list on the left and a reader pane on the right.
```

## Rewards Inbox

A loot-focused inbox where every message carries attachments.

```example
file: examples/RewardsInbox.ts
html: examples/RewardsInbox.html
title: Rewards Inbox
description: showAttachments on with attachment-bearing messages and a season-rewards mail pre-selected.
```

## Announcements Only

A read-only notice board with the Compose button and attachments hidden.

```example
file: examples/AnnouncementsOnly.ts
html: examples/AnnouncementsOnly.html
title: Announcements Only
description: showCompose and showAttachments disabled for a plain-text Game Master notice board.
```

```api
```
