import type { LayerPort, MapInteractionState, MapLayer } from "@trackunit/react-map-adapter-shared"; import { type RefObject } from "react"; import type { LayerHandle } from "../types"; export type UseLayerHandleSyncReturn = Readonly<{ renderedSourceIds: RefObject>; hasSourceReadiness: boolean; readyRevision: number; }>; /** * Syncs layer handles and interaction state to the map adapter via `LayerPort.setSnapshot`. * * Computes a full `LayerSnapshot` from the current handles and interaction state * and pushes it to the adapter on every change. The adapter owns the diff. * * Also manages `onSourceReady` subscriptions for shape layers so edge labels * can defer rendering until the parent shape source has finished drawing. */ export declare const useLayerHandleSync: (layerPort: LayerPort | null, handles: ReadonlyArray, interaction: MapInteractionState, decorationLayers?: ReadonlyArray) => UseLayerHandleSyncReturn;