import { EventEmitter, h } from '../../stencil-public-runtime';
import { Dimensions, Point, Rectangle } from '@vertexvis/geometry';
import { BasicViewer } from '@vertexvis/utils';
import { MarkupCenteringBehavior, MarkupInteraction } from '../../lib/types/markup';
/**
 * The supported markup modes.
 *
 * @see {@link ViewerMarkupFreeformMode.mode} - For more details about modes.
 */
export type ViewerMarkupFreeformMode = 'edit' | 'create' | '';
export declare class ViewerMarkupFreeform {
    /**
     * The positions of the various points of this freeform markup. Can either be an array of
     * `Point`s or a JSON string representation in the format of `[[x1, y1], [x2, y2]]` or
     * `[{"x": 0, "y": 0}, {"x": 0, "y": 0}]`.
     *
     * Points are expected to be relative coordinates from `[-0.5, 0.5]`,
     * e.g. `[0, 0]` corresponds to a point in the center of the viewport.
     */
    points?: Point.Point[];
    /**
     * The positions of the various points of this freeform markup. Can either be an array of
     * `Point`s or a JSON string representation in the format of `[[x1, y1], [x2, y2]]` or
     * `[{"x": 0, "y": 0}, {"x": 0, "y": 0}]`.
     *
     * Points are expected to be relative coordinates from `[-0.5, 0.5]`,
     * e.g. `[0, 0]` corresponds to a point in the center of the viewport.
     */
    pointsJson?: string;
    /**
     * The bounds of the freeform. Can either be an instance of a `Rectangle` or
     * a JSON string representation in the format of `[x, y, width, height]` or
     * `{"x": 0, "y": 0, "width": 10, "height": 10}`.
     *
     * Bounds are expected to have relative coordinates, with `[x, y]` from `[-0.5, 0.5]`
     * and `[width, height]` from `[0, 1]`, e.g. `[0, 0, 0.25, 0.25]`corresponds to a freeform
     * with a diameter of one fourth the viewport's smallest size in the center of the viewport.
     */
    bounds?: Rectangle.Rectangle;
    /**
     * The bounds of the freeform. Can either be an instance of a `Rectangle` or
     * a JSON string representation in the format of `[x, y, width, height]` or
     * `{"x": 0, "y": 0, "width": 0.1, "height": 0.1}`.
     *
     * Bounds are expected to have relative coordinates, with `[x, y]` from `[-0.5, 0.5]`
     * and `[width, height]` from `[0, 1]`, e.g. `[0, 0, 0.25, 0.25]`corresponds to a freeform
     * with a diameter of one fourth the viewport's smallest size in the center of the viewport.
     */
    boundsJson?: string;
    /**
     * A mode that specifies how the markup component should behave. When
     * unset, the component will not respond to interactions with the handles.
     * When `edit`, the markup anchors are interactive and the user is able
     * to reposition them. When `create`, anytime the user clicks on the canvas,
     * a new markup will be performed.
     */
    mode: ViewerMarkupFreeformMode;
    /**
     * The viewer to connect to markups.
     *
     * This property will automatically be set when a child of a
     * `<vertex-viewer-markup>` or `<vertex-viewer>` element.
     */
    viewer?: BasicViewer;
    /**
     * The original viewport dimensions where this markup was created. This value is used
     * to determine where the markup should be rendered relative to the current viewport,
     * enabling some markup to appear "off-screen".
     *
     * When provided, all NDC values will be considered relative to this viewport.
     */
    originatingViewport?: Dimensions.Dimensions;
    /**
     * Defines the behavior of the provided markup when the originating viewport is smaller
     * than the current viewport, or is scaled to a size smaller than the current viewport
     * using the `scale` property.
     *
     * Options:
     * - `x-only`: Markup will be centered horizontally, but not vertically.
     * - `y-only`: Markup will be centered vertically, but not horizontally.
     * - `both`: Markup will be centered both horizontally and vertically.
     * - `none`: Markup will not be centered (default).
     */
    centeringBehavior: MarkupCenteringBehavior;
    /**
     * The current offset of the visible viewport. This value is used to determine where
     * markup should be rendered relative to the current viewport, enabling some markup to appear "off-screen".
     *
     * When provided, all computed coordinates will be offset by this amount.
     */
    offset?: Point.Point;
    /**
     * The scale to render this markup at. This value is used to scale the element's bounds
     * along with any `offset` to determine the final computed coordinates.
     *
     * When provided, all computed coordinates will be scaled by this amount.
     */
    scale: number;
    /**
     * An event that is dispatched anytime the user begins interacting with the
     * markup.
     */
    interactionBegin: EventEmitter<void>;
    /**
     * An event that is dispatched when the user has finished interacting with the
     * markup.
     */
    interactionEnd: EventEmitter<MarkupInteraction>;
    /**
     * An event that is dispatched when this markup element is in view
     * mode (`this.mode === ""`), and it completes a rerender.
     */
    viewRendered: EventEmitter<void>;
    private hostEl;
    private elementBounds?;
    private screenPoints;
    private interactionHandler;
    private registeredInteraction?;
    /**
     * @ignore
     */
    protected componentWillLoad(): void;
    protected componentDidLoad(): void;
    protected componentDidRender(): void;
    protected disconnectedCallback(): void;
    dispose(): Promise<void>;
    /**
     * @ignore
     */
    protected handleViewerChanged(newViewer?: BasicViewer): Promise<void>;
    protected recomputePointsFromProps(): void;
    protected handleScalingConfigurationChange(): void;
    protected handleScaleChange(): void;
    protected handleModeChange(): void;
    private updateViewport;
    private updatePointsFromProps;
    render(): h.JSX.IntrinsicElements;
    private handleWindowPointerDown;
    private handleTouchStart;
    private convertPointsToScreen;
}
