import {
  Meta,
  Title,
  Subtitle,
  Description,
  Primary,
  Controls,
  Stories,
} from '@storybook/addon-docs/blocks';
import * as MapDrawToolbarStories from './map-draw-toolbar.stories';

<Meta of={MapDrawToolbarStories} />

<Title />
<Subtitle>Arms and disarms the geofence drawing tool.</Subtitle>

<Description />

<Primary />

<Controls />

---

## Variations

<Stories />

---

## AI Best Practices

> [!IMPORTANT]
>
> - **Keep `active` in the parent** and pass it to both this toolbar and `<Map drawing>`.
> - **Reset it to `null` inside `onComplete`**, or the next click starts another shape.
> - **Pair the completed shape with `pointsInShape`** — that utility is what answers "who was inside the fence", with no Maps call.
> - The explicit idle button is deliberate: a drawing mode nobody can see they are in is how stray shapes get created.
