# XWUITaskStateSwitch

A compact task-state quick-toggle (Odoo task state) that renders a single colored icon button for the current state and opens a popover menu of the other states on click, changing state without a full menu. Feed it `data.states` (each `{ id, label, icon?, color?, disabled? }`) and the current `data.value`; built-in icons and colors are provided for the known ids `planned`, `in-progress`, `review`, `blocked`, `done`, and `cancelled`. `conf_comp.showLabel` prints the state name beside the icon, `size` is `xs|sm|md|lg`, and `readOnly` disables the trigger for display-only use; `onChange(state)` fires on selection. It is the inline state control embedded in `XWUICardTask`.

## Basic Usage

Five default Odoo-style states - Planned, In progress, Done, Cancelled, Blocked - with the current value set to `in-progress`, so the trigger shows the in-progress icon and the popover offers the rest.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A five-state switch (planned/in-progress/done/cancelled/blocked) starting on "in-progress" with default icons and colors.
```

## Readonly

A single Done state (custom green `#10b981`) with `readOnly: true` and `showLabel: true`, locking the switch as a non-interactive labeled status badge.

```example
file: examples/Readonly.ts
html: examples/Readonly.html
title: Readonly
description: A display-only "Done" switch (readOnly + showLabel) whose disabled trigger renders as a static status badge.
```

## With Label

Four states (Planned, In progress, Review, Done) at `md` size with `showLabel: true`, so the trigger renders the Review icon next to its text label.

```example
file: examples/WithLabel.ts
html: examples/WithLabel.html
title: With Label
description: A md-size switch on "Review" with showLabel enabled, drawing the state name beside the icon.
```

```api
```
