import { Event } from '../util/evented';
import Map, { CompleteMapOptions } from './map';
import HandlerInertia from './handler_inertia';
import Point from '../util/point';
export declare type InputEvent = MouseEvent | TouchEvent | KeyboardEvent | WheelEvent;
declare class RenderFrameEvent extends Event {
    type: 'renderFrame';
    timeStamp: number;
}
export interface Handler {
    enable(): void;
    disable(): void;
    isEnabled(): boolean;
    isActive(): boolean;
    reset(): void;
    readonly touchstart?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
    readonly touchmove?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
    readonly touchend?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
    readonly touchcancel?: (e: TouchEvent, points: Array<Point>, mapTouches: Array<Touch>) => HandlerResult | void;
    readonly mousedown?: (e: MouseEvent, point: Point) => HandlerResult | void;
    readonly mousemove?: (e: MouseEvent, point: Point) => HandlerResult | void;
    readonly mouseup?: (e: MouseEvent, point: Point) => HandlerResult | void;
    readonly dblclick?: (e: MouseEvent, point: Point) => HandlerResult | void;
    readonly wheel?: (e: WheelEvent, point: Point) => HandlerResult | void;
    readonly keydown?: (e: KeyboardEvent) => HandlerResult | void;
    readonly keyup?: (e: KeyboardEvent) => HandlerResult | void;
    readonly renderFrame?: () => HandlerResult | void;
}
export declare type HandlerResult = {
    panDelta?: Point;
    zoomDelta?: number;
    bearingDelta?: number;
    pitchDelta?: number;
    around?: Point | null;
    pinchAround?: Point | null;
    cameraAnimation?: (map: Map) => any;
    originalEvent?: any;
    needsRenderFrame?: boolean;
    noInertia?: boolean;
};
declare class HandlerManager {
    _map: Map;
    _el: HTMLElement;
    _handlers: Array<{
        handlerName: string;
        handler: Handler;
        allowed: any;
    }>;
    _eventsInProgress: any;
    _frameId: number;
    _inertia: HandlerInertia;
    _bearingSnap: number;
    _handlersById: {
        [x: string]: Handler;
    };
    _updatingCamera: boolean;
    _changes: Array<[HandlerResult, any, any]>;
    _previousActiveHandlers: {
        [x: string]: Handler;
    };
    _listeners: Array<[
        Window | Document | HTMLElement,
        string,
        {
            passive?: boolean;
            capture?: boolean;
        } | undefined
    ]>;
    constructor(map: Map, options: CompleteMapOptions);
    destroy(): void;
    _addDefaultHandlers(options: CompleteMapOptions): void;
    _add(handlerName: string, handler: Handler, allowed?: Array<string>): void;
    stop(allowEndAnimation: boolean): void;
    isActive(): boolean;
    isZooming(): boolean;
    isRotating(): boolean;
    isMoving(): boolean;
    _blockedByActive(activeHandlers: {
        [x: string]: Handler;
    }, allowed: Array<string>, myName: string): boolean;
    handleWindowEvent(e: InputEvent): void;
    _getMapTouches(touches: TouchList): TouchList;
    handleEvent(e: InputEvent | RenderFrameEvent, eventName?: string): void;
    mergeHandlerResult(mergedHandlerResult: HandlerResult, eventsInProgress: any, handlerResult: HandlerResult, name: string, e?: InputEvent): void;
    _applyChanges(): void;
    _updateMapTransform(combinedResult: any, combinedEventsInProgress: any, deactivatedHandlers: any): void;
    _fireEvents(newEventsInProgress: {
        [x: string]: any;
    }, deactivatedHandlers: any, allowEndAnimation: boolean): void;
    _fireEvent(type: string, e: any): void;
    _requestFrame(): number;
    _triggerRenderFrame(): void;
}
export default HandlerManager;
//# sourceMappingURL=handler_manager.d.ts.map