import type { ActionMap } from '../ActionMap'; /** * A site polygon currently shown on the map. The polygon geometry itself is * persisted as a GeoJSON file in minio (referenced by `assetId`/`fileId`); this * is the in-memory representation that drives the SiteLayer rendering. */ export interface ShownSite { /** DB site id */ id: number; name: string; /** Outer ring vertices [lng, lat], open (no repeated closing point) */ ring: [number, number][]; /** minio object key of the geometry geojson, for re-upload when edited */ assetId?: string; /** DB file id of the geometry geojson, for deletion */ fileId?: number; } export interface MapSitesState { /** Sites currently rendered on the map. */ sites: ShownSite[]; /** Site whose vertices are currently being dragged/edited, if any. */ editingSiteId: number | null; } export type MapSitesPayload = { ['SHOW_SITE']: { site: ShownSite; }; ['HIDE_SITE']: { id: number; }; ['UPDATE_SITE_RING']: { id: number; ring: [number, number][]; }; ['UPDATE_SITE_NAME']: { id: number; name: string; }; ['SET_SITE_GEOMETRY_REF']: { id: number; assetId?: string; fileId?: number; }; ['SET_EDITING_SITE']: { id: number | null; }; ['CLEAR_SITES']: undefined; }; export type MapSitesActions = ActionMap[keyof ActionMap]; export declare const initialMapSitesState: MapSitesState; export declare const MapSitesReducer: (state: MapSitesState, action: MapSitesActions) => MapSitesState; //# sourceMappingURL=reducer.d.ts.map