import { IMapViewer } from "../api/common";
import { OLGeometryType } from '../api/ol-types';
/**
 * @hidden
 */
export interface MeasureSegment {
    segment: number;
    length: number;
}
/**
 * @hidden
 */
export interface IMeasureCallback {
    updateSegments(kind: "LineString" | "Area", total: number, segments: MeasureSegment[] | undefined): void;
    clearSegments(): void;
}
/**
 * @hidden
 */
export interface IMeasureComponent {
    getCurrentDrawType(): OLGeometryType | undefined;
    getLocale(): string;
}
/**
 * @hidden
 */
export declare class MeasureContext {
    private olFactory;
    private draw;
    private measureOverlays;
    private measureLayer;
    private viewer;
    private sketch;
    private listener;
    private helpTooltipElement;
    private helpTooltip;
    private measureTooltipElement;
    private measureTooltip;
    private mapName;
    private layerName;
    private parent;
    private callback;
    constructor(viewer: IMapViewer, mapName: string, parent: IMeasureComponent);
    /**
     * Establishes the new parent component for this context. Is called by the
     * new parent component when it mounts and is resuming from previously recorded
     * measurements and is not meant to be called directly
     *
     * @param parent The new parent component
     * @since 0.12
     */
    setParent(parent: IMeasureComponent): void;
    /**
     * Detaches the parent component from this context. Is called by the parent
     * component when it unmounts and is not meant to be called directly.
     *
     * @since 0.12
     */
    detachParent(): void;
    /**
     * Format length output.
     * @param {LineString} line The line.
     * @return {string} The formatted length.
     */
    private formatLength;
    /**
     * Format area output.
     * @param {Polygon} polygon The polygon.
     * @return {string} Formatted area.
     */
    private formatArea;
    private onDrawStart;
    private onDrawEnd;
    private onMouseMove;
    getMapName(): string;
    private createMeasureStyle;
    private createDrawInteraction;
    private removeElement;
    /**
     * Creates a new help tooltip
     */
    private createHelpTooltip;
    /**
     * Creates a new measure tooltip
     */
    private createMeasureTooltip;
    private setActiveInteraction;
    startMeasure(): void;
    endMeasure(): void;
    clearMeasurements(): void;
    handleDrawTypeChange(): void;
    /**
     * Since 0.12, mapName is required to explicitly state which map you are activating the context for
     *
     * @param {string} mapName
     * @param {IMeasureCallback} callback
     * @memberof MeasureContext
     */
    activate(mapName: string, callback: IMeasureCallback): void;
    /**
     * Since 0.12, mapName is required to explicitly state which map you are deactivating the context for
     *
     * @param {string} mapName
     * @memberof MeasureContext
     */
    deactivate(mapName: string): void;
}
