import { Anchor, PointWithUnit, DataCaptureOverlay, DataCaptureView } from '@scandit/web-datacapture-core';
import { Serializable } from '@scandit/web-datacapture-core/build/js/private/Serializable';
import { nativeHandle } from '@scandit/web-datacapture-core/build/js/private/nativeHandle.js';
import { N as NativeProxyHandle } from './NativeProxy-BpXwaSl-.js';
import { CapturedLabel } from './api/CapturedLabel.js';
import { L as LabelCapture } from './LabelCapture-DrHOFOh1.js';
import { LabelCaptureOverlayJSON } from './api/LabelCaptureOverlayJSON.js';
import { LabelField } from './api/LabelField.js';

interface LabelCaptureAdvancedOverlayListener {
    /**
     * View to be drawn corresponding to the given CapturedLabel.
     * Called before anchorForCapturedLabel() and offsetForCapturedLabel().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param capturedLabel The captured label to create a view for
     */
    viewForCapturedLabel?(overlay: LabelCaptureAdvancedOverlay, capturedLabel: CapturedLabel): HTMLElement | null;
    /**
     * Anchor point that should be used for the view corresponding to the given CapturedLabel.
     * Called after viewForCapturedLabel() and before offsetForCapturedLabel().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param capturedLabel The captured label to determine anchor for
     */
    anchorForCapturedLabel?(overlay: LabelCaptureAdvancedOverlay, capturedLabel: CapturedLabel): Anchor;
    /**
     * Offset to be set to the view corresponding to the given CapturedLabel.
     * Called after viewForCapturedLabel() and anchorForCapturedLabel().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param capturedLabel The captured label to determine offset for
     * @param view The view to offset
     */
    offsetForCapturedLabel?(overlay: LabelCaptureAdvancedOverlay, capturedLabel: CapturedLabel, view: HTMLElement): PointWithUnit;
    /**
     * View to be drawn corresponding to the given LabelField.
     * Called before anchorForCapturedLabelField() and offsetForCapturedLabelField().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param labelField The label field to create a view for
     */
    viewForCapturedLabelField?(overlay: LabelCaptureAdvancedOverlay, labelField: LabelField): HTMLElement | null;
    /**
     * Anchor point that should be used for the view corresponding to the given LabelField.
     * Called after viewForCapturedLabelField() and before offsetForCapturedLabelField().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param labelField The label field to determine anchor for
     */
    anchorForCapturedLabelField?(overlay: LabelCaptureAdvancedOverlay, labelField: LabelField): Anchor;
    /**
     * Offset to be set to the view corresponding to the given LabelField.
     * Called after viewForCapturedLabelField() and anchorForCapturedLabelField().
     * @param overlay The LabelCaptureAdvancedOverlay instance
     * @param labelField The label field to determine offset for
     * @param view The view to offset
     */
    offsetForCapturedLabelField?(overlay: LabelCaptureAdvancedOverlay, labelField: LabelField, view: HTMLElement): PointWithUnit;
}

declare class LabelCaptureAdvancedOverlay implements DataCaptureOverlay, Serializable<LabelCaptureOverlayJSON> {
    [nativeHandle]: NativeProxyHandle;
    private onWorkerMessageHandler;
    private _dataCaptureView;
    private defaultOffset;
    private _viewForCapturedLabelMap;
    private _viewForCapturedLabelFieldMap;
    private _anchorForCapturedLabelMap;
    private _offsetForCapturedLabelMap;
    private _offsetForCapturedLabelFieldMap;
    private _anchorForCapturedLabelFieldMap;
    listener: LabelCaptureAdvancedOverlayListener | null;
    static withLabelCaptureForView(labelCapture: LabelCapture, view: DataCaptureView): Promise<LabelCaptureAdvancedOverlay>;
    private constructor();
    private keyForCapturedLabelField;
    setShouldShowScanAreaGuides(show: boolean): Promise<void>;
    getShouldShowScanAreaGuides(): Promise<boolean>;
    setViewForCapturedLabel(capturedLabel: CapturedLabel, view?: HTMLElement): void;
    setAnchorForCapturedLabel(capturedLabel: CapturedLabel, anchor: Anchor): void;
    setOffsetForCapturedLabel(capturedLabel: CapturedLabel, offset: PointWithUnit): void;
    setViewForCapturedLabelField(field: LabelField, capturedLabel: CapturedLabel, view?: HTMLElement): void;
    setAnchorForCapturedLabelField(labelField: LabelField, capturedLabel: CapturedLabel, anchor: Anchor): void;
    setOffsetForCapturedLabelField(labelField: LabelField, capturedLabel: CapturedLabel, offset: PointWithUnit): void;
    clearCapturedLabelViews(): void;
    private onWorkerMessage;
    private handleUpdateField;
    private update;
    toJSONObject(): LabelCaptureOverlayJSON;
}

export { LabelCaptureAdvancedOverlay as L, type LabelCaptureAdvancedOverlayListener as a };
