# XWUISubscriptionBillingPanel

A current plan and billing history panel: a plan card (name, price/interval, next billing date), "Upgrade plan" / "Cancel subscription" actions, and a compact billing history list (date, amount, paid/failed/pending status). Cancelling sets `data.isCanceled` and swaps the cancel button for a "Subscription canceled" notice; the plan card dims and the next-billing line switches to "Access ends".

## Events

| Event | Callback | Subscriber | `detail` |
|---|---|---|---|
| `xwui-subscription-billing-panel:upgrade` | `onUpgrade` | `onUpgrade(handler)` | — |
| `xwui-subscription-billing-panel:cancel` | `onCancel` | `onCancel(handler)` | — |

## Usage

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

const panel = new XWUISubscriptionBillingPanel(host, {
  planName: 'Pro Plan',
  planPrice: 29,
  billingInterval: 'monthly',
  nextBillingDate: '2026-09-01',
});

panel.onCancel(() => api.cancelSubscription());
```

```api
```
