import { Dispatcher } from '../../bus';
import { ViewerType } from '../../viewer';
export declare enum FindState {
    FOUND = 0,
    NOT_FOUND = 1,
    WRAPPED = 2,
    PENDING = 3
}
type State = {
    highlightAll?: boolean;
    type?: string;
    query?: string | string[];
    findPrevious?: boolean;
    matchDiacritics?: boolean;
    entireWord?: boolean;
    caseSensitive?: boolean;
};
export declare class FindController extends Dispatcher {
    protected readonly viewer: ViewerType;
    protected updateMatchesCountOnProgress: boolean;
    protected firstPageCapability?: PromiseWithResolvers<void>;
    protected findTimeout?: NodeJS.Timeout;
    protected extractTextPromises: Promise<void>[];
    protected pageContents: string[];
    protected pageDiffs: number[][][];
    protected hasDiacritics: boolean[];
    protected matchesCountTotal: number;
    protected pagesToSearch: number;
    protected pendingFindMatches: Set<unknown>;
    protected resumePageIndex?: number;
    protected _highlightMatches: boolean;
    protected scrollMatches: boolean;
    protected dirtyMatch: boolean;
    protected _pageMatches: number[][];
    protected _pageMatchesLength: number[][];
    protected visitedPagesCount: number;
    protected rawQuery?: string;
    protected normalizedQuery?: string;
    protected _state?: State;
    protected _selected: {
        pageIndex: number;
        matchIndex: number;
    };
    protected offset: {
        pageIndex?: number;
        matchIndex?: number;
        wrapped?: boolean;
    };
    constructor(viewer: ViewerType, updateMatchesCountOnProgress?: boolean);
    get eventBus(): import('../../bus').EventBus<Record<string, import('../../bus').ListenerCallback>, string>;
    get logger(): import('../../viewer/logger').Logger;
    get pdfDocument(): import('pdfjs-dist/types/src/display/api').PDFDocumentProxy | undefined;
    get pagesCount(): number;
    get page(): number;
    set page(value: number);
    get highlightMatches(): boolean;
    get pageMatches(): number[][];
    get pageMatchesLength(): number[][];
    get selected(): {
        pageIndex: number;
        matchIndex: number;
    };
    get state(): State | undefined;
    getVisiblePages(): import('../../utils').VisibleElements;
    reset(): void;
    init(): void;
    find(state?: State): void;
    close(): void;
    scrollMatchIntoView({ element, selectedLeft, pageIndex, matchIndex, }: {
        element?: HTMLElement;
        selectedLeft: number;
        pageIndex: number;
        matchIndex: number;
    }): void;
    protected get query(): string | string[] | undefined;
    protected shouldDirtyMatch(state: State): boolean;
    protected calculateMatch(pageIndex: number): void;
    protected match(query: string | string[], pageContent: string, pageIndex: number): {
        index: number;
        length: number;
    }[] | undefined;
    protected extractText(): void;
    protected updatePage(index: number): void;
    protected updateAllPages(): void;
    protected nextMatch(): void;
    protected matchesReady(matches: number[]): boolean;
    protected nextPageMatch(): void;
    protected advanceOffsetPage(previous?: boolean): void;
    protected updateMatch(found?: boolean): void;
    protected requestMatchesCount(): {
        current: number;
        total: number;
    };
    protected updateUIState(state: number, previous?: boolean): void;
}
export {};
