/** * Per-row composition context provided by `Legend.Row`. Actions placed inside * the row resolve their target layer from here instead of taking a `layerId` * prop, and the opacity compound (`Legend.Opacity.Item` / `.Inline`) shares * its open state through it. */ export interface LegendRowContextValue { layerId: string; opacityOpen: boolean; setOpacityOpen: (open: boolean) => void; } export declare const LegendRowContext: import('react').Context; /** Nearest `Legend.Row` composition context, or `null` outside a row. */ export declare function useLegendRow(): LegendRowContextValue | null; /** Per-group composition context provided by `Legend.Group` (the group id). */ export declare const LegendGroupContext: import('react').Context; /** Nearest `Legend.Group` id, or `null` outside a group. */ export declare function useLegendGroupId(): string | null; /** * Overflow-menu controller for `Legend.RowMenu` / `Legend.GroupMenu` / * `Legend.PanelMenu`. Async items (e.g. `Legend.ZoomTo`) use `setBusy` to keep * the menu open and show in-item loading feedback, then `close()` when the * handler settles. Prefer `runAsyncMenuAction` over calling these by hand. */ export interface LegendMenuController { /** Reactive busy flag for UI (spinner / disabled). */ busy: boolean; /** * Synchronous busy check (ref-backed) — use this to gate clicks so a second * press before React re-renders cannot start another async action. */ isBusy: () => boolean; setBusy: (busy: boolean) => void; close: () => void; } export declare const LegendMenuContext: import('react').Context; /** Nearest overflow-menu controller, or `null` outside a row/group menu. */ export declare function useLegendMenu(): LegendMenuController | null;