/** @packageDocumentation
 * @module Measure
 */
import { Id64Array } from "@itwin/core-bentley";
import { Matrix3d, Point3d, Vector3d, XAndY, XYAndZ } from "@itwin/core-geometry";
import { GeometryStreamProps, MassPropertiesOperation, MassPropertiesResponseProps } from "@itwin/core-common";
import { DialogItem, DialogPropertySyncItem, PropertyDescription } from "@itwin/appui-abstract";
import { ContextRotationId } from "../AccuDraw";
import { LocateFilterStatus, LocateResponse } from "../ElementLocateManager";
import { HitDetail } from "../HitDetail";
import { Marker } from "../Marker";
import { CanvasDecoration } from "../render/CanvasDecoration";
import { DecorateContext } from "../ViewContext";
import { Viewport } from "../Viewport";
import { PrimitiveTool } from "./PrimitiveTool";
import { BeButtonEvent, EventHandled } from "./Tool";
/** @internal */
declare class MeasureLabel implements CanvasDecoration {
    worldLocation: Point3d;
    position: Point3d;
    label: string;
    constructor(worldLocation: XYAndZ, label: string);
    drawDecoration(ctx: CanvasRenderingContext2D): void;
    setPosition(vp: Viewport): boolean;
    addDecoration(context: DecorateContext): void;
}
/** @internal */
declare class MeasureMarker extends Marker {
    isSelected: boolean;
    constructor(label: string, title: HTMLElement, worldLocation: XYAndZ, size: XAndY);
    onMouseButton(_ev: BeButtonEvent): boolean;
    onMouseEnter(ev: BeButtonEvent): void;
    onMouseLeave(): void;
}
/** @internal */
interface Location {
    point: Point3d;
    adjustedPoint: Point3d;
    refAxes: Matrix3d;
}
/** @internal */
interface Segment {
    distance: number;
    slope: number;
    start: Point3d;
    end: Point3d;
    delta: Vector3d;
    adjustedStart: Point3d;
    adjustedEnd: Point3d;
    adjustedDelta: Vector3d;
    refAxes: Matrix3d;
    marker: MeasureMarker;
}
/** Report distance between 2 points using current quantity formatter for length.
 * @public
 */
export declare class MeasureDistanceTool extends PrimitiveTool {
    static toolId: string;
    static iconSpec: string;
    /** @internal */
    protected readonly _locationData: Location[];
    /** @internal */
    protected readonly _acceptedSegments: Segment[];
    /** @internal */
    protected _totalDistance: number;
    /** @internal */
    protected _totalDistanceMarker?: MeasureLabel;
    /** @internal */
    protected _snapGeomId?: string;
    /** @internal */
    protected _lastMotionPt?: Point3d;
    /** @internal */
    protected _lastMotionAdjustedPt?: Point3d;
    /** @internal */
    protected allowView(vp: Viewport): boolean;
    /** @internal */
    isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean;
    /** @internal */
    isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean;
    /** @internal */
    requireWriteableTarget(): boolean;
    /** @internal */
    onPostInstall(): Promise<void>;
    /** @internal */
    onUnsuspend(): Promise<void>;
    /** @internal */
    protected showPrompt(): void;
    /** @internal */
    protected setupAndPromptForNextAction(): void;
    /** @internal */
    testDecorationHit(id: string): boolean;
    /** @internal */
    protected getSnapPoints(): Point3d[] | undefined;
    /** @internal */
    getDecorationGeometry(_hit: HitDetail): GeometryStreamProps | undefined;
    /** @internal */
    protected displayDynamicDistance(context: DecorateContext, points: Point3d[], adjustedPoints: Point3d[]): void;
    /** @internal */
    protected displayDelta(context: DecorateContext, seg: any): void;
    /** @internal */
    protected createDecorations(context: DecorateContext, isSuspended: boolean): void;
    /** @internal */
    decorate(context: DecorateContext): void;
    /** @internal */
    decorateSuspended(context: DecorateContext): void;
    /** @internal */
    onMouseMotion(ev: BeButtonEvent): Promise<void>;
    protected reportMeasurements(): void;
    protected updateTotals(): Promise<void>;
    protected getMarkerToolTip(distance: number, slope: number, start: Point3d, end: Point3d, delta?: Vector3d): Promise<HTMLElement>;
    /** @internal */
    protected updateSelectedMarkerToolTip(seg: any, ev: BeButtonEvent, reopenToolTip: boolean): Promise<void>;
    /** @internal */
    protected acceptNewSegments(): Promise<void>;
    /** @internal */
    protected getReferenceAxes(vp?: Viewport): Matrix3d;
    /** @internal */
    onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onResetButtonUp(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onUndoPreviousStep(): Promise<boolean>;
    /** @internal */
    onRestartTool(): Promise<void>;
}
/** Report spatial coordinate at a point as well as cartographic location for geolocated models using current quantity formatters.
 * @public
 */
export declare class MeasureLocationTool extends PrimitiveTool {
    static toolId: string;
    static iconSpec: string;
    /** @internal */
    protected readonly _acceptedLocations: MeasureMarker[];
    /** @internal */
    protected allowView(vp: Viewport): boolean;
    /** @internal */
    isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean;
    /** @internal */
    isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean;
    /** @internal */
    requireWriteableTarget(): boolean;
    /** @internal */
    onPostInstall(): Promise<void>;
    /** @internal */
    onUnsuspend(): Promise<void>;
    /** @internal */
    protected showPrompt(): void;
    /** @internal */
    protected setupAndPromptForNextAction(): void;
    protected getMarkerToolTip(point: Point3d): Promise<HTMLElement>;
    /** @internal */
    decorate(context: DecorateContext): void;
    /** @internal */
    decorateSuspended(context: DecorateContext): void;
    protected reportMeasurements(): void;
    /** @internal */
    onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onUndoPreviousStep(): Promise<boolean>;
    /** @internal */
    onRestartTool(): Promise<void>;
}
/** Report area defined by points using current quantity formatter for area.
 * @public
 */
export declare class MeasureAreaByPointsTool extends PrimitiveTool {
    static toolId: string;
    static iconSpec: string;
    /** @internal */
    private _orientationValue;
    /** @internal */
    protected readonly _points: Point3d[];
    /** @internal */
    protected _matrix?: Matrix3d;
    /** @internal */
    protected _isComplete: boolean;
    /** @internal */
    protected _area: number;
    /** @internal */
    protected _perimeter: number;
    /** @internal */
    protected _centroid: Point3d;
    /** @internal */
    protected _marker?: MeasureLabel;
    /** @internal */
    protected _acceptedMeasurement?: MeasureMarker;
    /** @internal */
    protected _lastMotionPt?: Point3d;
    /** @internal */
    get orientation(): ContextRotationId;
    set orientation(option: ContextRotationId);
    /** @internal */
    protected static _orientationName: string;
    /** @internal */
    protected static enumAsOrientationMessage(str: string): string;
    /** @internal */
    protected static _getEnumAsOrientationDescription: () => PropertyDescription;
    /** @internal */
    supplyToolSettingsProperties(): DialogItem[] | undefined;
    /** @internal */
    applyToolSettingPropertyChange(updatedValue: DialogPropertySyncItem): Promise<boolean>;
    /** @internal */
    protected allowView(vp: Viewport): boolean;
    /** @internal */
    isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean;
    /** @internal */
    isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean;
    /** @internal */
    requireWriteableTarget(): boolean;
    /** @internal */
    onPostInstall(): Promise<void>;
    /** @internal */
    onUnsuspend(): Promise<void>;
    /** @internal */
    protected showPrompt(): void;
    /** @internal */
    protected setupAndPromptForNextAction(): void;
    /** @internal */
    protected getShapePoints(cursorPt: Point3d): Point3d[];
    /** @internal */
    decorate(context: DecorateContext): void;
    /** @internal */
    decorateSuspended(context: DecorateContext): void;
    /** @internal */
    onMouseMotion(ev: BeButtonEvent): Promise<void>;
    protected getMarkerToolTip(): Promise<HTMLElement>;
    protected reportMeasurements(): void;
    protected updateTotals(): Promise<void>;
    /** @internal */
    onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onResetButtonUp(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onReinitialize(): Promise<void>;
    /** @internal */
    onUndoPreviousStep(): Promise<boolean>;
    /** @internal */
    onRestartTool(): Promise<void>;
}
/** Base class for mass properties tools.
 * @public
 */
export declare abstract class MeasureElementTool extends PrimitiveTool {
    /** @internal */
    protected readonly _checkedIds: Map<string, MassPropertiesResponseProps>;
    /** @internal */
    protected readonly _acceptedIds: Id64Array;
    /** @internal */
    protected readonly _acceptedMeasurements: MeasureMarker[];
    /** @internal */
    protected _totalValue: number;
    /** @internal */
    protected _totalMarker?: MeasureLabel;
    /** @internal */
    protected _useSelection: boolean;
    protected abstract getOperation(): MassPropertiesOperation;
    /** @internal */
    protected allowView(vp: Viewport): boolean;
    /** @internal */
    isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean;
    /** @internal */
    requireWriteableTarget(): boolean;
    /** @internal */
    onPostInstall(): Promise<void>;
    /** @internal */
    onCleanup(): Promise<void>;
    /** @internal */
    onUnsuspend(): Promise<void>;
    /** @internal */
    protected showPrompt(): void;
    /** @internal */
    protected setupAndPromptForNextAction(): void;
    /** @internal */
    decorate(context: DecorateContext): void;
    /** @internal */
    decorateSuspended(context: DecorateContext): void;
    protected reportMeasurements(): void;
    protected getMarkerToolTip(responseProps: MassPropertiesResponseProps): Promise<HTMLElement>;
    private getResultValue;
    protected updateTotals(selectionSetResult?: MassPropertiesResponseProps): Promise<void>;
    /** @internal */
    doMeasureSelectedElements(viewport: Viewport): Promise<void>;
    /** @internal */
    filterHit(hit: HitDetail, _out?: LocateResponse): Promise<LocateFilterStatus>;
    /** @internal */
    onReinitialize(): Promise<void>;
    /** @internal */
    onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
    /** @internal */
    onUndoPreviousStep(): Promise<boolean>;
}
/** Report accumulated lengths of selected elements using the current quantity formatter for length.
 * @public
 */
export declare class MeasureLengthTool extends MeasureElementTool {
    static toolId: string;
    static iconSpec: string;
    protected getOperation(): MassPropertiesOperation;
    /** @internal */
    onRestartTool(): Promise<void>;
}
/** Report accumulated areas of selected elements using the current quantity formatter for area.
 * @public
 */
export declare class MeasureAreaTool extends MeasureElementTool {
    static toolId: string;
    static iconSpec: string;
    protected getOperation(): MassPropertiesOperation;
    /** @internal */
    onRestartTool(): Promise<void>;
}
/** Report accumulated volumes of selected elements using the current quantity formatter for volume.
 * @public
 */
export declare class MeasureVolumeTool extends MeasureElementTool {
    static toolId: string;
    static iconSpec: string;
    protected getOperation(): MassPropertiesOperation;
    /** @internal */
    onRestartTool(): Promise<void>;
}
export {};
//# sourceMappingURL=MeasureTool.d.ts.map