/** * Result of the `useLayerReady` hook. * Provides the `ready` promise, `loadsData` flag, and current `isLoading` state * for use in layer handles. */ export type LayerReadyResult = Readonly<{ /** Resolves when initial data is available. Stable reference across renders. */ ready: Promise; /** Whether this layer fetches its own data (true when `loading` arg is provided). */ loadsData: boolean; /** Current loading state. */ isLoading: boolean; }>; /** * Shared hook that tracks initial data readiness for a layer. * * - `loading: undefined` -> not a data-loading layer; ready immediately. * - `loading: false` -> data-loading layer with data already available; ready immediately. * - `loading: true` -> data-loading layer still waiting; ready is a deferred promise * that resolves on the first `true -> false` transition. * * Once resolved, the promise stays resolved. Subsequent `true -> false` cycles * do NOT re-pend -- this hook tracks *initial* readiness only. */ export declare const useLayerReady: (loading?: boolean) => LayerReadyResult;