import { type MapClassifyMethod } from './map-classify'; import type { GeoJsonFeatureCollection } from './map-geojson'; import type { ColorToken, MapFeatureRef } from './map.types'; export interface MapChoroplethConfig { /** Feature property holding the value to classify. */ field: string; /** Number of classes. @default 5 */ steps?: number; /** @default 'quantile' */ method?: MapClassifyMethod; /** Ramp stops, cold to hot. Intermediate shades are interpolated. */ scaleTokens: ColorToken[]; /** Fill for features whose value is missing or unclassifiable. */ noDataToken?: ColorToken; /** @default 0.72 */ fillOpacity?: number; /** @default 0.9 */ strokeOpacity?: number; /** Decimal places in the generated legend labels. @default 0 */ labelDigits?: number; } /** One computed class, ready to become a legend row. */ export interface MapChoroplethBand { index: number; min: number; max: number; color: string; label: string; } export interface UseMapChoroplethOptions { map: google.maps.Map | null; isLoaded: boolean; geojson?: GeoJsonFeatureCollection | null; choropleth?: MapChoroplethConfig; colors: Record; /** Highlight color for the feature under the cursor. */ hoverColor: string; visible?: boolean; zIndex?: number; onSelect?: (id: string, feature: MapFeatureRef) => void; onHover?: (id: string | null, feature: MapFeatureRef | null) => void; } /** * Paints a territorial mesh by value. * * @description * Uses `google.maps.Data`, which reads GeoJSON directly and gives per-feature * events, rather than converting every polygon by hand. * * The computed bands are returned so the caller can hand them to `MapLegend`. * A choropleth whose legend was written separately is a choropleth that will * eventually lie about its own classes, so the bands come from the same * classification that painted the map. */ export declare function useMapChoropleth({ map, isLoaded, geojson, choropleth, colors, hoverColor, visible, zIndex, onSelect, onHover, }: UseMapChoroplethOptions): MapChoroplethBand[];