# XWUIAbandonedCartRecovery

An abandoned-cart recovery nudge: how long ago the cart was abandoned (`data.abandonedAt`), its line items, an optional discount-incentive banner (`data.discountPercent`, shown alongside a struck-through original price), and two actions - "Resume checkout" and "Send email reminder" (which flips to a sent confirmation and disables itself once clicked).

## Events

| Event | Callback | Subscriber | `detail` |
|---|---|---|---|
| `xwui-abandoned-cart-recovery:resume-checkout` | `onResumeCheckout` | `onResumeCheckout(handler)` | — |
| `xwui-abandoned-cart-recovery:send-reminder` | `onSendReminder` | `onSendReminder(handler)` | — |

## Usage

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

const nudge = new XWUIAbandonedCartRecovery(host, {
  customerName: 'Jordan',
  abandonedAt: '2026-08-17T01:00:00Z',
  discountPercent: 10,
  items: [{ id: 'i1', name: 'Trail Running Jacket', price: 89, quantity: 1 }],
});

nudge.onResumeCheckout(() => router.navigate('/checkout'));
```

```api
```
