import { Feature, Point, Polygon, LineString } from "geojson";
type JSON = string | number | boolean | null | JSONArray | JSONObject;
export interface JSONObject {
    [member: string]: JSON;
}
type JSONArray = Array<JSON>;
type DefinedProperties = Record<string, JSON>;
export type GeoJSONStoreGeometries = Polygon | LineString | Point;
export type BBoxPolygon = Feature<Polygon, DefinedProperties>;
export type GeoJSONStoreFeatures = Feature<GeoJSONStoreGeometries, DefinedProperties>;
export type StoreChangeEvents = "delete" | "create" | "update" | "styling";
export type StoreChangeHandler = (ids: FeatureId[], change: StoreChangeEvents) => void;
export type FeatureId = string | number;
export type IdStrategy<Id extends FeatureId> = {
    isValidId: (id: Id) => boolean;
    getId: () => Id;
};
export type GeoJSONStoreConfig<Id extends FeatureId> = {
    idStrategy?: IdStrategy<Id>;
    tracked?: boolean;
};
export declare const defaultIdStrategy: {
    getId: <FeatureId>() => FeatureId;
    isValidId: (id: FeatureId) => boolean;
};
export declare class GeoJSONStore<Id extends FeatureId = FeatureId> {
    constructor(config?: GeoJSONStoreConfig<Id>);
    idStrategy: IdStrategy<Id>;
    private tracked;
    private spatialIndex;
    private store;
    private _onChange;
    private clone;
    getId(): FeatureId;
    has(id: FeatureId): boolean;
    load(data: GeoJSONStoreFeatures[], featureValidation?: (feature: unknown, tracked?: boolean) => boolean): void;
    search(bbox: BBoxPolygon, filter?: (feature: GeoJSONStoreFeatures) => boolean): GeoJSONStoreFeatures[];
    registerOnChange(onChange: StoreChangeHandler): void;
    getGeometryCopy<T extends GeoJSONStoreGeometries>(id: FeatureId): T;
    getPropertiesCopy(id: FeatureId): DefinedProperties;
    updateProperty(propertiesToUpdate: {
        id: FeatureId;
        property: string;
        value: JSON;
    }[]): void;
    updateGeometry(geometriesToUpdate: {
        id: FeatureId;
        geometry: GeoJSONStoreGeometries;
    }[]): void;
    create<Id extends FeatureId>(features: {
        geometry: GeoJSONStoreGeometries;
        properties?: JSONObject;
    }[]): Id[];
    delete(ids: FeatureId[]): void;
    copyAll(): GeoJSONStoreFeatures[];
    clear(): void;
    size(): number;
}
export {};
