# XWUIGameBarterPanel

NPC item-for-item barter interface. It lays out two columns - items `offered` by the player on the left and items `requested` from the NPC on the right (each item carries `id`, `name`, `icon`, `value`, `quantity`) - with a value balance bar between them showing whether the trade is fair. Feed it the `offered`/`requested` arrays plus `fairValue` (the reference threshold) and `balance` (offered total minus requested total); set `conf_comp.showValue: false` to hide the per-item values and balance bar. Clicking the Barter button dispatches the `xwui-barter-confirm` event.

## Basic Usage

Mounts the barter panel ready to display the offered/requested columns.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Mounts the barter panel with its offer/request columns and value balance bar.
```

## Hidden Values

Hides all value numbers and the balance bar with showValue:false for a flavor-first exchange of icons and names.

```example
file: examples/HiddenValues.ts
html: examples/HiddenValues.html
title: Hidden Values
description: A barter with showValue:false hiding per-item values, totals, and the balance bar.
```

## Lopsided Trade

A clearly unfair deal where the offered value falls far below the request, flagging the balance bar red and disabling Barter.

```example
file: examples/LopsidedTrade.ts
html: examples/LopsidedTrade.html
title: Lopsided Trade
description: An imbalanced trade with a negative balance that shows the unfair bar and disables the Barter button.
```

```api
```
