/// <reference types="node" />
import type * as Core from '@applitools/core';
import { EyesSelector } from './EyesSelector';
import { Image } from './Image';
import { AccessibilityRegionType } from '../enums/AccessibilityRegionType';
import { MatchLevel } from '../enums/MatchLevel';
import { Region, LegacyRegion } from './Region';
import { Location } from './Location';
import { LazyLoadOptions } from './LazyLoadOptions';
import { DensityMetrics } from './DensityMetrics';
type RegionReference<TSpec extends Core.SpecType> = Region | ElementReference<TSpec>;
type ElementReference<TSpec extends Core.SpecType> = TSpec['element'] | SelectorReference<TSpec>;
type SelectorReference<TSpec extends Core.SpecType> = EyesSelector<TSpec['selector']>;
type FrameReference<TSpec extends Core.SpecType> = ElementReference<TSpec> | string | number;
type ContextReference<TSpec extends Core.SpecType> = {
    frame: FrameReference<TSpec>;
    scrollRootElement?: ElementReference<TSpec>;
};
type CodedRegion<TRegion = never> = {
    region: Region | TRegion;
    padding?: number | {
        top: number;
        bottom: number;
        left: number;
        right: number;
    };
    regionId?: string;
};
type CodedFloatingRegion<TRegion = never> = CodedRegion<TRegion> & {
    offset?: {
        top?: number;
        bottom?: number;
        left?: number;
        right?: number;
    };
};
/** @deprecated */
type LegacyCodedFloatingRegion<TRegion = never> = CodedRegion<TRegion> & {
    maxUpOffset?: number;
    maxDownOffset?: number;
    maxLeftOffset?: number;
    maxRightOffset?: number;
};
type CodedAccessibilityRegion<TRegion = never> = CodedRegion<TRegion> & {
    type?: AccessibilityRegionType;
};
export type CheckSettingsBase<TRegion = never> = {
    name?: string;
    region?: Region | TRegion;
    matchLevel?: MatchLevel;
    useDom?: boolean;
    sendDom?: boolean;
    enablePatterns?: boolean;
    ignoreDisplacements?: boolean;
    ignoreMismatch?: boolean;
    ignoreCaret?: boolean;
    ignoreRegions?: (CodedRegion<TRegion> | Region | TRegion)[];
    layoutRegions?: (CodedRegion<TRegion> | Region | TRegion)[];
    strictRegions?: (CodedRegion<TRegion> | Region | TRegion)[];
    contentRegions?: (CodedRegion<TRegion> | Region | TRegion)[];
    floatingRegions?: (CodedFloatingRegion<TRegion> | LegacyCodedFloatingRegion<TRegion> | Region | TRegion)[];
    accessibilityRegions?: (CodedAccessibilityRegion<TRegion> | Region | TRegion)[];
    pageId?: string;
    variationGroupId?: string;
    densityMetrics?: DensityMetrics;
};
export type CheckSettingsImage = CheckSettingsBase;
export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettingsBase<RegionReference<TSpec>> & {
    frames?: (ContextReference<TSpec> | FrameReference<TSpec>)[];
    webview?: boolean | string;
    scrollRootElement?: ElementReference<TSpec>;
    fully?: boolean;
    disableBrowserFetching?: boolean;
    layoutBreakpoints?: boolean | number[] | {
        breakpoints: number[] | boolean;
        reload?: boolean;
    };
    visualGridOptions?: {
        [key: string]: any;
    };
    /** @deprecated */
    nmgOptions?: {
        [key: string]: any;
    };
    useSystemScreenshot?: boolean;
    hooks?: {
        beforeCaptureScreenshot: string;
    };
    timeout?: number;
    waitBeforeCapture?: number;
    lazyLoad?: boolean | LazyLoadOptions;
};
export declare class CheckSettingsBaseFluent<TRegion = never> {
    protected _settings: CheckSettingsBase<TRegion>;
    constructor(settings?: CheckSettingsBase<TRegion> | CheckSettingsBaseFluent<TRegion>);
    region(region: Region | LegacyRegion | TRegion): this;
    name(name: string): this;
    withName(name: string): this;
    ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
    ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    /** @deprecated */
    ignore(region: Region | LegacyRegion | TRegion): this;
    /** @deprecated */
    ignores(...regions: (Region | LegacyRegion | TRegion)[]): this;
    layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
    layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
    strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
    contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    floatingRegion(region: CodedFloatingRegion<TRegion>): this;
    floatingRegion(region: LegacyCodedFloatingRegion<TRegion>): this;
    floatingRegion(region: Region | LegacyRegion | TRegion, maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number): this;
    floatingRegions(...regions: (CodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    floatingRegions(maxOffset: number, ...regions: (Region | LegacyRegion | TRegion)[]): this;
    /** @deprecated */
    floating(region: CodedFloatingRegion<TRegion>): this;
    /** @deprecated */
    floating(region: Region | LegacyRegion | TRegion): this;
    /** @deprecated */
    floatings(...regions: (CodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    /** @deprecated */
    floatings(maxOffset: number, ...regions: (Region | LegacyRegion | TRegion)[]): this;
    accessibilityRegion(region: CodedAccessibilityRegion<TRegion>): this;
    accessibilityRegion(region: Region | LegacyRegion | TRegion, type?: AccessibilityRegionType): this;
    accessibilityRegions(...regions: (CodedAccessibilityRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
    accessibilityRegions(type: AccessibilityRegionType, ...regions: (Region | LegacyRegion | TRegion)[]): this;
    matchLevel(matchLevel: MatchLevel): this;
    layout(): this;
    exact(): this;
    strict(): this;
    ignoreColors(): this;
    /** @deprecated */
    content(): this;
    enablePatterns(enablePatterns?: boolean): this;
    ignoreDisplacements(ignoreDisplacements?: boolean): this;
    ignoreCaret(ignoreCaret?: boolean): this;
    useDom(useDom?: boolean): this;
    sendDom(sendDom?: boolean): this;
    pageId(pageId: string): this;
    variationGroupId(variationGroupId: string): this;
    /** @internal */
    toObject(): CheckSettingsBase<TRegion>;
    /** @internal */
    toString(): string;
}
export declare class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
    protected _target: Image;
    constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image);
    image(image: Buffer | URL | string): this;
    buffer(imageBuffer: Buffer): this;
    base64(imageBase64: Buffer): this;
    path(imagePath: string): this;
    url(imageUrl: URL | string): this;
    name(name: string): this;
    withDom(dom: string): this;
    withLocation(locationInViewport: Location): this;
    /** @internal */
    toJSON(): {
        target: Image;
        settings: Core.CheckSettings<never, 'classic'>;
    };
}
export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType = Core.SpecType> extends CheckSettingsBaseFluent<RegionReference<TSpec>> {
    protected _settings: CheckSettingsAutomation<TSpec>;
    protected static readonly _spec: Core.SpecDriver<Core.SpecType>;
    protected _spec: Core.SpecDriver<TSpec>;
    protected _isElementReference(value: any): value is ElementReference<TSpec>;
    protected _isSelectorReference(selector: any): selector is SelectorReference<TSpec>;
    protected _isFrameReference(value: any): value is FrameReference<TSpec>;
    constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>);
    /** @internal */
    constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>);
    region(region: RegionReference<TSpec>): this;
    shadow(selector: SelectorReference<TSpec>): this;
    frame(context: ContextReference<TSpec>): this;
    frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): this;
    webview(webview?: string | boolean): this;
    scrollRootElement(scrollRootElement: ElementReference<TSpec>): this;
    fully(fully?: boolean): this;
    /** @deprecated */
    stitchContent(stitchContent?: boolean): this;
    disableBrowserFetching(disableBrowserFetching: boolean): this;
    layoutBreakpoints(breakpoints?: boolean | number[], settings?: {
        reload?: boolean;
    }): this;
    hook(name: string, script: string): this;
    beforeRenderScreenshotHook(script: string): this;
    /** @deprecated */
    webHook(script: string): this;
    ufgOption(key: string, value: any): this;
    ufgOptions(options: {
        [key: string]: any;
    }): this;
    /** @deprecated */
    nmgOption(key: string, value: any): this;
    /** @deprecated */
    nmgOptions(options: {
        [key: string]: any;
    }): this;
    /** @deprecated */
    visualGridOption(key: string, value: any): this;
    /** @deprecated */
    visualGridOptions(options: {
        [key: string]: any;
    }): this;
    useSystemScreenshot(useSystemScreenshot?: boolean): this;
    timeout(timeout: number): this;
    waitBeforeCapture(waitBeforeCapture: number): this;
    lazyLoad(options?: LazyLoadOptions | boolean): this;
    densityMetrics(options: DensityMetrics): this;
    /** @internal */
    toJSON(): {
        target: undefined;
        settings: Core.CheckSettings<TSpec, 'classic'> & Core.CheckSettings<TSpec, 'ufg'>;
    };
}
export type TargetImage = {
    image(image: Buffer | URL | string): CheckSettingsImageFluent;
    buffer(imageBuffer: Buffer): CheckSettingsImageFluent;
    base64(imageBase64: string): CheckSettingsImageFluent;
    path(imagePath: string): CheckSettingsImageFluent;
    url(imageUrl: URL | string): CheckSettingsImageFluent;
};
export declare const TargetImage: TargetImage;
export type TargetAutomation<TSpec extends Core.SpecType = Core.SpecType> = {
    /** @internal */
    spec: Core.SpecDriver<TSpec>;
    window(): CheckSettingsAutomationFluent<TSpec>;
    region(region: RegionReference<TSpec> | LegacyRegion): CheckSettingsAutomationFluent<TSpec>;
    frame(context: ContextReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
    frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
    shadow(selector: SelectorReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
    webview(webview?: string | boolean): CheckSettingsAutomationFluent<TSpec>;
};
export declare const TargetAutomation: TargetAutomation<Core.SpecType>;
export type Target<TSpec extends Core.SpecType = Core.SpecType> = TargetImage & TargetAutomation<TSpec>;
export declare const Target: Target<Core.SpecType>;
export {};
