import type { Entity, LayerPort } from "@trackunit/react-map-adapter-shared"; type UseEntityInteractionConfig = Readonly<{ layerPort: LayerPort | null; hover: (entity: Entity | null) => void; select: (entity: Entity | null) => void; dblClick?: (entity: Entity) => void; /** * Called when the user clicks a map entity (marker, cluster, shape) directly * on the map — fired before `select` and exclusively for real pointer clicks. * * Use this to distinguish a genuine user click from a programmatic * `layers.select()` call (e.g. from a list selection), which does not flow * through this callback. */ onClick?: (entity: Entity) => void; }>; /** * Subscribes to entity interaction events (click, dblclick, hover-start, * hover-end) from the map adapter and dispatches to the provided callbacks. * * Hover-end is debounced to prevent flickering from rapid mouseleave/mouseenter * pairs when the cursor moves within a marker's DOM tree. * * @returns A stable callback to guard/unguard against adapter hover events. * Call with `true` when a DOM-path hover begins (cancels pending timers and * suppresses adapter hover-start/hover-end). Call with `false` when the DOM * hover ends, allowing adapter events to flow again. */ export declare const useEntityInteraction: ({ layerPort, hover, select, dblClick, onClick, }: UseEntityInteractionConfig) => ((active: boolean) => void); export {};