import { composeControlAreas } from "./composeControlAreas"; import { defineControlStack } from "./defineControlStack"; export type ControlStackHelpers = Readonly<{ defineControlStack: typeof defineControlStack; composeControlAreas: typeof composeControlAreas; }>; /** * Build-your-own hook: stable references to control composition helpers. * * Returns `defineControlStack` and `composeControlAreas` for consumers building * custom control layouts without duplicating the stack-ordering logic already * used by `Controls`. Pass area stacks directly to `composeControlAreas` — it * runs `defineControlStack` per area. Use `defineControlStack` on its own when * assembling a single area's `{ controls }` outside `composeControlAreas`. * * @example * ```tsx * const { composeControlAreas } = useControlStack(); * const controls = composeControlAreas({ * navigation: [ * builtIn.navigation.myLocation, * builtIn.navigation.zoom, * builtIn.navigation.fullscreen, * ], * settings: [ * ...markers.layer.controls.settings ?? [], * builtIn.settings.mapStyle, * isAdmin ? adminControl : undefined, * ], * }); * ``` */ export declare const useControlStack: () => ControlStackHelpers;