import type { MapDrawnShape } from './map-geometry-math'; import type { ColorToken } from './map.types'; export type MapDrawMode = 'polygon' | 'circle' | 'rectangle'; export interface MapDrawingConfig { /** @default ['polygon'] */ modes?: MapDrawMode[]; /** The mode currently armed. `null` or `false` disarms the tool. */ active?: MapDrawMode | boolean | null; onComplete: (shape: MapDrawnShape) => void; onCancel?: () => void; /** Stroke and fill of the shape while it is being drawn. */ colorToken?: ColorToken; /** Leave the drawn overlay on the map after completion. @default false */ keepOverlay?: boolean; } export interface UseMapDrawingOptions { map: google.maps.Map | null; isLoaded: boolean; drawing?: MapDrawingConfig; colors: Record; defaultColor: string; } /** * Free-hand geofence drawing on top of `google.maps.drawing.DrawingManager`. * * @description * The `drawing` library was already being loaded and no component exposed it, * so this costs no extra bundle. Pair the result with `pointsInShape` to answer * "who was inside" without a single Maps call. * * The finished overlay is removed by default: the shape is reported as plain * coordinates, and leaving Google's object behind would put a second, untracked * geometry on a map that already renders its shapes declaratively. */ export declare function useMapDrawing({ map, isLoaded, drawing, colors, defaultColor, }: UseMapDrawingOptions): void;