import BaseObject from 'ol/Object';
import React, { JSX } from 'react';
import { RContextType } from './context';
export declare const handlersSymbol = "_rlayers_handlers";
export type OLEvent = 'change';
export type Handler = (e: unknown) => boolean | void;
export type Handlers = Record<OLEvent, Handler>;
export declare class RlayersBase<P, S> extends React.PureComponent<P, S> {
    static contextType: React.Context<RContextType>;
    context: RContextType;
    ol: BaseObject;
    eventSources: BaseObject[];
    protected static getOLObject<T>(prop: string, ol: BaseObject): T;
    protected get handlers(): Handlers;
    /**
     * Get the lowercase names of the currently installed handlers
     */
    protected getCurrentEvents(): Handlers;
    /**
     * Get the uppercase name of this event
     */
    protected getHandlerProp(event: OLEvent): string | void;
    protected incrementHandlers(ev: OLEvent): void;
    protected decrementHandlers(ev: OLEvent): void;
    protected attachEventHandlers(): void;
    protected attachOldEventHandlers(newSource: BaseObject): void;
    protected refresh(prevProps?: P): void;
    /**
     * Programmatically add an event handler to an RLayers component.
     *
     * @param {string} ev OpenLayers event
     * @param {Handler} cb Callback
     */
    on(ev: OLEvent, cb: Handler): void;
    /**
     * Programmatically add an event handler to an RLayers component.
     *
     * Although public, use of this method is discouraged as it lacks
     * any safety against calling un on a method that has not been
     * registered.
     *
     * @param {string} ev OpenLayers event
     * @param {Handler} cb Callback
     */
    un(ev: OLEvent, cb: Handler): void;
    componentDidMount(): void;
    propsDiff(prev: P): boolean;
    componentDidUpdate(prevProps: Readonly<P>, prev: Readonly<unknown>, snap: unknown): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
}
//# sourceMappingURL=REvent.d.ts.map