import { GenericEvent, ImageFormat, RefreshMode, SelectionVariant, ClientKind, LayerTransparencySet, IMapGuideViewerSupport, Dictionary } from '../../api/common';
import { IQueryMapFeaturesOptions } from '../../api/request-builder';
import { QueryMapFeaturesResponse, FeatureSet } from '../../api/contracts/query';
import Polygon from 'ol/geom/Polygon';
import Geometry from 'ol/geom/Geometry';
import { MgLayerSetGroup } from "../../api/mg-layer-set-group";
import { RuntimeMap } from '../../api/contracts/runtime-map';
import { BaseMapProviderContext, IMapProviderState, IViewerComponent, IMapProviderStateExtras } from './base';
import { MapGuideMockMode } from '../mapguide-debug-context';
import { IGenericSubjectMapLayer } from '../../actions/defs';
export declare function isMapGuideProviderState(arg: any): arg is IMapGuideProviderState;
export interface IMapGuideProviderState extends IMapProviderState {
    /**
     * @since 0.14
     */
    stateless: boolean;
    imageFormat: ImageFormat;
    /**
     * @since 0.14
     */
    appSettings: Dictionary<string>;
    agentUri: string | undefined;
    agentKind: ClientKind;
    map: RuntimeMap | IGenericSubjectMapLayer;
    pointSelectionBuffer: number;
    manualFeatureTooltips: boolean;
    featureTooltipsEnabled: boolean;
    sessionId: string | undefined;
    selectionColor: string;
    selectionImageFormat: ImageFormat;
    selectableLayerNames: string[];
    layerTransparency: LayerTransparencySet | undefined;
    showGroups: string[];
    hideGroups: string[];
    showLayers: string[];
    hideLayers: string[];
    activeSelectedFeatureXml: string;
    activeSelectedFeatureColor: string;
    selection: QueryMapFeaturesResponse | null;
}
export declare class MapGuideMapProviderContext extends BaseMapProviderContext<IMapGuideProviderState, MgLayerSetGroup> implements IMapGuideViewerSupport {
    mockMode: MapGuideMockMode | undefined;
    /**
     * This is a throttled version of _refreshOnStateChange(). Call this on any
     * modifications to pendingStateChanges
     *
     * @private
     */
    private refreshOnStateChange;
    private _client;
    private _keepAlive;
    private _featureTooltip;
    private _utfGridTooltip;
    private _wktFormat;
    constructor(mockMode?: MapGuideMockMode | undefined);
    /**
     * @override
     */
    getHookFunction(): () => IMapProviderState & IMapProviderStateExtras;
    setMockMode(mode: MapGuideMockMode | undefined): void;
    /**
     * @override
     */
    hideAllPopups(): void;
    /**
     *
     * @override
     * @protected
     * @returns {(MapGuideMockMode | undefined)}
     * @memberof MapGuideMapProviderContext
     */
    protected getMockMode(): MapGuideMockMode | undefined;
    protected getInitialProviderState(): Omit<IMapGuideProviderState, keyof IMapProviderState>;
    getProviderName(): string;
    /**
     * @override
     * @returns {(IMapGuideViewerSupport | undefined)}
     * @memberof MapGuideMapProviderContext
     */
    mapguideSupport(): IMapGuideViewerSupport | undefined;
    getSelection(): QueryMapFeaturesResponse | null;
    getSelectionXml(selection: FeatureSet, layerIds?: string[] | undefined): string;
    getSessionId(): string;
    setFeatureTooltipEnabled(enabled: boolean): void;
    private onSessionExpired;
    protected onProviderMapClick(px: [number, number]): void;
    /**
     * @override
     * @protected
     * @param {GenericEvent} e
     * @returns
     * @memberof BaseMapProviderContext
     */
    protected onMouseMove(e: GenericEvent): void;
    private queryFeatureTooltip;
    private handleFeatureTooltipMouseMove;
    private enableFeatureTooltips;
    private refreshMapInternal;
    private showSelectedFeature;
    /**
     * DO NOT CALL DIRECTLY, call this.refreshOnStateChange() instead, which is a throttled version
     * of this method
     * @private
     */
    private _refreshOnStateChange;
    /**
     * @override
     * @protected
     * @param {GenericEvent} e
     * @memberof MapGuideMapProviderContext
     */
    protected onImageError(e: GenericEvent): void;
    private getSelectableLayers;
    private buildDefaultQueryOptions;
    /**
     * @virtual
     * @protected
     * @param {Polygon} geom
     * @memberof MapGuideMapProviderContext
     */
    protected selectFeaturesByExtent(geom: Polygon): void;
    private onOpenTooltipLink;
    /**
     * @override
     * @protected
     */
    protected initLayerSet(nextState: IMapGuideProviderState): MgLayerSetGroup;
    /**
     * @override
     * @readonly
     * @memberof MapGuideMapProviderContext
     */
    isMouseOverTooltip(): boolean;
    /**
     * @override
     */
    detachFromComponent(): void;
    /**
     * @override
     * @param {HTMLElement} el
     * @param {IViewerComponent} comp
     * @memberof MapGuideMapProviderContext
     */
    attachToComponent(el: HTMLElement, comp: IViewerComponent): void;
    /**
     * @override
     * @param {RefreshMode} [mode=RefreshMode.LayersOnly | RefreshMode.SelectionOnly]
     * @memberof MapGuideMapProviderContext
     */
    refreshMap(mode?: RefreshMode): void;
    /**
     * @override
     * @protected
     * @param {MgLayerSetGroup} layerSetGroup
     * @memberof MapGuideMapProviderContext
     */
    protected onBeforeAttachingLayerSetGroup(layerSetGroup: MgLayerSetGroup): void;
    /**
     *
     * @virtual
     * @param {IMapGuideProviderState} nextState
     * @memberof MapGuideMapProviderContext
     */
    setProviderState(nextState: IMapGuideProviderState): void;
    setSelectionXml(xml: string, queryOpts?: Partial<IQueryMapFeaturesOptions>, success?: (res: QueryMapFeaturesResponse) => void, failure?: (err: Error) => void): void;
    clearSelection(): void;
    selectByGeometry(geom: Geometry, selectionMethod?: SelectionVariant): void;
    queryMapFeatures(options: IQueryMapFeaturesOptions, success?: (res: QueryMapFeaturesResponse) => void, failure?: (err: Error) => void): void;
    isFeatureTooltipEnabled(): boolean;
    private sendSelectionQuery;
}
