import { EventEmitter } from '../stencil-public-runtime';
import { HTMLStencilElement } from '../stencil-public-runtime';
import { BalConfig } from './config';
/**
 * Request Largest Contentful Paint (LCP) callback
 */
export declare const rLCP: (callback: () => void, timeout?: number) => NodeJS.Timeout;
export declare const rOnLoad: (callback: () => void, timeout?: number) => void;
export declare const rIC: (callback: () => void, timeout?: number) => void;
export declare const wait: (ms?: number) => Promise<void>;
export declare const debounceEvent: (ev: EventEmitter, wait: number) => EventEmitter;
export declare const debounceLCP: (func: (...args: any[]) => void, wait?: number) => (...args: any[]) => any;
export declare const debounce: (func: (...args: any[]) => void, wait?: number) => (...args: any[]) => any;
export declare const hasTagName: (element: any, tag: string) => boolean;
export declare const isDescendant: (parent: HTMLElement | HTMLStencilElement, child: HTMLElement | HTMLStencilElement | EventTarget) => boolean;
export declare const hasParent: (parentTag: string, child: HTMLElement | EventTarget) => boolean;
export declare const getSibling: (parentTag: HTMLElement | EventTarget, child: string) => HTMLElement | null;
export declare const getAppRoot: (doc: Document) => HTMLElement | HTMLBalAppElement;
/**
 * Waits for a component to be ready for
 * both custom element and non-custom element builds.
 * If non-custom element build, el.componentOnReady
 * will be used.
 * For custom element builds, we wait a frame
 * so that the inner contents of the component
 * have a chance to render.
 *
 * Use this utility rather than calling
 * el.componentOnReady yourself.
 */
export declare const componentOnReady: (el: any, callback: any) => void;
/**
 * Patched version of requestAnimationFrame that avoids ngzone
 * Use only when you know ngzone should not run
 */
export declare const raf: (h: any) => any;
export declare const transitionEndAsync: (el: HTMLElement | HTMLStencilElement | null, expectedDuration?: number) => Promise<unknown>;
export declare const addEventListener: (el: any, eventName: string, callback: any, opts?: any) => any;
export declare const removeEventListener: (el: any, eventName: string, callback: any, opts?: any) => any;
export declare const shallowReady: (el: any | undefined) => Promise<any>;
export declare const deepReady: (el: any | undefined, full?: boolean) => Promise<void>;
export declare const waitForComponent: (el: HTMLElement | HTMLStencilElement | null) => Promise<void>;
export declare const isChildOfEventTarget: (ev: any, el: HTMLElement | HTMLStencilElement | Window | Document, callback: (target: HTMLElement | HTMLStencilElement) => void) => Promise<void>;
export declare const waitForDesignSystem: (el: any | null, _config?: BalConfig) => Promise<void>;
export declare const waitAfterFramePaint: () => Promise<unknown>;
export declare const waitAfterIdleCallback: () => Promise<unknown>;
export declare const waitAfterLargestContentfulPaintCallback: () => Promise<unknown>;
export declare const waitOnLoadEventCallback: () => Promise<unknown>;
export declare const runHighPrioritizedTask: (callback: (value: unknown) => void) => void;
export declare const waitForRequestIdleCallback: () => () => Promise<unknown>;
