export declare function useSpinner(containerId: string, pollingFunction: PollingFunction, successFunction: VoidFunction, errorFunction: VoidFunction): Promise; export type PollingFunction = (abortSignal: AbortSignal) => Promise; export declare enum PollResult { Success = 0, Failure = 1, Pending = 2, Backoff = 3 } declare enum SpinnerState { Waiting = 0, LongWaiting = 1, Error = 2, Complete = 3 } type SpinnerConfig = { msBeforeInformingOfLongWait: number; msBeforeAbort: number; msBetweenRequests: number; msBetweenDomUpdate: number; ariaAlertCompletionText?: string; hideSpinnerOnError: boolean; maxBackoffTries: number; }; export declare class Spinner { container: HTMLDivElement; noJsContent: HTMLElement; waitContent?: HTMLElement; longWaitContent?: HTMLElement; successContent?: HTMLElement; errorContent?: HTMLElement; ariaLiveContainer: HTMLDivElement; visibleElementsContainer: HTMLDivElement; state: SpinnerState; displayState?: SpinnerState; updateDomTimer?: NodeJS.Timeout; abortController: AbortController; config: SpinnerConfig; backOffCount: number; pollingFunction: PollingFunction; onSuccess: VoidFunction; onError: VoidFunction; constructor(domContainer: HTMLDivElement, pollingFunction: PollingFunction, onSuccess: VoidFunction, onError: VoidFunction); init(): Promise; private getElementOrThrow; private getConfig; private createAbortController; private handleAbort; private getInitTime; private initTimer; private hasCompleted; private reflectSuccess; private reflectError; private reflectLongWait; private updateStateAccordingToTimeElapsed; private createSpinnerElement; private updateDom; private cloneAndAddIfExists; private callPollingFunction; private calculateBackoffTime; private createAriaLiveContainer; private updateAriaAlert; } export {}; //# sourceMappingURL=spinner.d.ts.map