import type { ReaderState } from './reader.state.js'; import type { RepaintCtx, repaint as _repaint } from './reader.repaint.js'; import type { KeyInfo } from './types.js'; export interface ReverseSearchState { active: boolean; query: string; matchIndex: number; savedBuffer: string; } export declare function createReverseSearchState(): ReverseSearchState; export declare function enterReverseSearch(rs: ReverseSearchState, st: ReaderState): void; export declare function cancelReverseSearch(rs: ReverseSearchState, st: ReaderState): void; export declare function acceptReverseSearch(rs: ReverseSearchState, _st: ReaderState): void; export declare function findNextMatch(query: string, entries: readonly string[], startAfter: number): number; export declare function renderReverseSearchLine(query: string, match: string | null): string; export declare function handleReverseSearchKey(char: string | undefined, key: KeyInfo, rs: ReverseSearchState, st: ReaderState, entries: readonly string[], repaintCtx: RepaintCtx, repaintFn: typeof _repaint): boolean;