# XWUIDealWorkbench

A list-plus-detail workbench for a rep's open deals: a filterable card list
(one `XWUICardDeal` per deal, tabs computed from the stages actually present)
on the left, and a detail rail on the right that composes `XWUIPipelineStages`
(the selected deal's own stage progress), `XWUILeadScore` (its dial) and
`XWUIQuickActions` (call / email / note / task / meeting / log) for whichever
deal is selected.

This is deliberately **not** a kanban board - `industry/crm/XWUIDealPipelineBoard`
already covers that shape (drag-free stage moves via ‹/› buttons, one column
per stage). `XWUIDealWorkbench` is for scanning and drilling into a single
book of deals rather than moving cards between columns; the two compose the
same underlying deal shape but serve different working modes, and neither
reimplements the other.

Lead score falls back to `probability` when a deal carries no explicit
`leadScore`, so the dial always shows something meaningful. A deal marked
`stage: 'lost'` is shown lost at the LAST open stage in the pipeline strip -
this shape has no "lost from which stage" field, so that is a documented
simplification, not a data loss; a host that tracks the real lost-at stage
should pass it through `stage` directly instead (i.e. the deal's `stage` stays
whatever open stage it was lost from, plus a separate `health: 'stalled'`
marker, rather than switching to the literal `'lost'` stage).

## Basic Usage

Five open deals with lead scores, the highest-value one selected by default.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Five open deals with lead scores, the highest-value one selected by default so the detail rail renders on first paint.
```

## Loading

```example
file: examples/Loading.ts
html: examples/Loading.html
title: Loading
description: A data source that has not resolved yet renders XWUISkeleton instead of the list/detail.
```

## Error State

```example
file: examples/ErrorState.ts
html: examples/ErrorState.html
title: Error State
description: A failed data load renders XWUIAlert(variant 'error') instead of the list/detail.
```

## RTL (Arabic)

```example
file: examples/RtlArabic.ts
html: examples/RtlArabic.html
title: RTL (Arabic)
description: The same workbench with Arabic deal data under direction 'rtl'.
```

```api
```
