# XWUIGameTradePanel

Player-to-player trade interface. It splits into two columns showing each side's offered items (`myItems` / `theirItems`, each `id`, `name`, `icon`, `quantity`) and gold (`myGold` / `theirGold`), with dual-confirm tracking via `myConfirmed`/`theirConfirmed` and confirm/cancel buttons. `conf_comp.maxSlots` caps items per side (default 8) and `showConfirm` toggles the action buttons. `addItem(item)` adds to your slots, while `confirm()` and `cancel()` dispatch the `xwui-trade-confirm` and `xwui-trade-cancel` events.

## Basic Usage

Mounts the trade panel with both players' item slots and gold.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Mounts the trade panel with split item columns, gold inputs, and dual confirm/cancel buttons.
```

## One Side Confirmed

Locks in your offer with myConfirmed while the other player's side stays pending, showing the dual-confirm state.

```example
file: examples/OneSideConfirmed.ts
html: examples/OneSideConfirmed.html
title: One Side Confirmed
description: A trade with myConfirmed true and theirConfirmed false, giving your column the confirmed styling and check.
```

## Add Item Live

Sweetens an in-progress deal by calling addItem() after construction to push another stack into your side.

```example
file: examples/AddItemLive.ts
html: examples/AddItemLive.html
title: Add Item Live
description: Calls addItem(item) after mounting to append a stack to your column and re-render under the maxSlots cap.
```

```api
```
