export declare type Container<T = HTMLElement> = T | null;
export declare type OnCompleteRunKind = 'success' | 'timeout' | 'bypass';
export declare type OnCompleteRunParams = [
    cache: string[],
    delta: string[],
    kind: OnCompleteRunKind
];
export declare type OnCompleteRun = (...args: OnCompleteRunParams) => void;
export declare type StyleSetter = (container: Container, show: boolean) => void;
export declare const w: (Window & typeof globalThis) | undefined;
export declare const TIMEOUT = 3000;
declare type TagsElsReturn = {
    tags: string[];
    elements: Element[];
};
export declare const uniqueTagsAndElements: (list: Element[], regex?: RegExp) => TagsElsReturn;
declare const initialStyle: {
    readonly visibility: "hidden";
};
export declare const unique: <T extends string>(...arr: T[][]) => T[];
export declare const merge: <T extends string>(arr1: T[], arr2: T[]) => [T[], T[]];
export interface AntiFlickerOptions {
    /** By default, the script will check each located element for a `hydrated` class and return `true` if it has it. Doing another check is possible with this predicate function. */
    checkPredicate?(el: Element): boolean;
    /** By default a cleanup is done before each run. If this is done by the provided cleanup function returned from invoking `run` (for ex when used in React.useEffect), this can be disabled as a small optimization. */
    cleanupOnRun?: boolean;
    /** When the run is done, either by the checkPredicate returning true for all found elements, by timeout or by bypassing checks because of no new elements, this optionally provided callback is invoked. */
    onCompleteRun?: OnCompleteRun;
    /** Only use this option if you provide a custom `checkPredicate`. Default is `{ attributes: true }` */
    observerOptions?: MutationObserverInit;
    /** RegExp to pick out tags of interest. Default regex is `/(TELIA-|B2(X|C|B)-)/`. NOTE: All tags is in CAPS. */
    regex?: RegExp;
    /** Opt-out of container style manipulation by setting this to `false`. */
    setContainerStyle?: boolean;
    /** Override the normal function which is switching between `visibility: hidden` and removing the `visibility` attribute. Does not have to set style, all side effects or actions on the container are fine. */
    styleSetter?: StyleSetter;
    /** Timeout in ms before the scripts bails out and finishes. Defaults to 3000. */
    timeout?: number;
}
export declare type RunScript = (container: Container) => () => void;
export declare type CreateAntiFlicker = (options?: AntiFlickerOptions) => {
    cleanup(): void;
    initialStyle: typeof initialStyle;
    run: RunScript;
};
export declare const createAntiFlicker: CreateAntiFlicker;
export {};
