# XWUIGiftCardBalance

A gift card balance checker: a code input + "Check balance" button. Looks the code up (case-insensitively) in `data.validCards`; a match shows the remaining balance and an "Apply to order" button, a miss shows an inline error.

## Events

| Event | Callback | Subscriber | `detail` |
|---|---|---|---|
| `xwui-gift-card-balance:check-balance` | `onCheckBalance` | `onCheckBalance(handler)` | `{ code, balance }` |
| `xwui-gift-card-balance:apply-to-order` | `onApplyToOrder` | `onApplyToOrder(handler)` | `{ code, balance }` |

## Usage

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

const widget = new XWUIGiftCardBalance(host, {
  validCards: { GIFT100: 47.5 },
});

widget.onApplyToOrder((code, balance) => cart.applyGiftCard(code, balance));
```

```api
```
