/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import type { Highlight } from '../highlight';
import type { InjectedScript } from '../injectedScript';
import type * as actions from '@recorder/actions';
import type { ElementInfo, Mode, OverlayState, UIState } from '@recorder/recorderTypes';
export interface RecorderDelegate {
    performAction?(action: actions.PerformOnRecordAction): Promise<void>;
    recordAction?(action: actions.Action): Promise<void>;
    elementPicked?(elementInfo: ElementInfo): Promise<void>;
    setMode?(mode: Mode): Promise<void>;
    setOverlayState?(state: OverlayState): Promise<void>;
    highlightUpdated?(): void;
}
declare class Overlay {
    private _recorder;
    private _listeners;
    private _overlayElement;
    private _dragHandle;
    private _recordToggle;
    private _pickLocatorToggle;
    private _assertVisibilityToggle;
    private _assertTextToggle;
    private _assertValuesToggle;
    private _assertSnapshotToggle;
    private _offsetX;
    private _dragState;
    private _measure;
    constructor(recorder: Recorder);
    private _refreshListeners;
    install(): void;
    contains(element: Element): boolean;
    setUIState(state: UIState): void;
    flashToolSucceeded(tool: 'assertingVisibility' | 'assertingSnapshot' | 'assertingValue'): void;
    private _hideOverlay;
    private _showOverlay;
    private _updateVisualPosition;
    onMouseMove(event: MouseEvent): boolean;
    onMouseUp(event: MouseEvent): boolean;
    onClick(event: MouseEvent): boolean;
    onDblClick(event: MouseEvent): boolean;
}
export declare class Recorder {
    readonly injectedScript: InjectedScript;
    private _listeners;
    private _currentTool;
    private _tools;
    private _lastHighlightedSelector;
    private _lastHighlightedAriaTemplateJSON;
    private _lastActionAutoexpectSnapshot;
    readonly highlight: Highlight;
    readonly overlay: Overlay | undefined;
    private _stylesheet;
    state: UIState;
    readonly document: Document;
    private _delegate;
    constructor(injectedScript: InjectedScript, options?: {
        recorderMode?: 'default' | 'api';
        hideToolbar?: boolean;
    });
    installListeners(): void;
    private _switchCurrentTool;
    setUIState(state: UIState, delegate: RecorderDelegate): void;
    clearHighlight(): void;
    private _onClick;
    private _onDblClick;
    private _onContextMenu;
    private _onDragStart;
    private _onPointerDown;
    private _onPointerUp;
    private _onMouseDown;
    private _onMouseUp;
    private _onMouseMove;
    private _onMouseEnter;
    private _onMouseLeave;
    private _onFocus;
    private _onScroll;
    private _onInput;
    private _onKeyDown;
    private _onKeyUp;
    updateHighlight(model: HighlightModel | null, userGesture: boolean): void;
    private _updateHighlight;
    private _ignoreOverlayEvent;
    deepEventTarget(event: Event): HTMLElement;
    setMode(mode: Mode): void;
    private _captureAutoExpectSnapshot;
    performAction(action: actions.PerformOnRecordAction): Promise<void>;
    recordAction(action: actions.Action): Promise<void>;
    setOverlayState(state: {
        offsetX: number;
    }): void;
    elementPicked(selector: string, model: HighlightModel): void;
}
type HighlightModel = {
    selector?: string;
    elements: Element[];
    color: string;
    tooltipText?: string;
};
export type SvgJson = {
    tagName: 'svg' | 'defs' | 'clipPath' | 'path';
    attrs?: Record<string, string>;
    children?: SvgJson[];
};
export {};
//# sourceMappingURL=recorder.d.ts.map