import { KeyboardEvent } from 'react';
export interface MaskedFieldSectionRange<TSection extends string = string> {
    end: number;
    section: TSection;
    start: number;
}
interface GetMaskedFieldSectionsFromSelectionOptions {
    includeAdjacentWhenNoDirectHit?: boolean;
}
/**
 * Resolve the active fixed-width section from the current selection or caret position.
 */
export declare function getMaskedFieldSectionRangeFromSelection<TSection extends string, TRange extends MaskedFieldSectionRange<TSection>>(sectionRanges: TRange[], selectionStart: number, selectionEnd: number): TRange | null;
/**
 * Resolve the adjacent section used by left and right keyboard navigation.
 */
export declare function getAdjacentMaskedFieldSectionRange<TSection extends string, TRange extends MaskedFieldSectionRange<TSection>>(sectionRanges: TRange[], currentRange: TRange, direction: -1 | 1): TRange;
/**
 * Resolve the first or last editable section in a fixed-width field mask.
 */
export declare function getMaskedFieldBoundarySectionRange<TSection extends string, TRange extends MaskedFieldSectionRange<TSection>>(sectionRanges: TRange[], boundary: 'start' | 'end'): TRange;
/**
 * Resolve the next editable caret position inside the protected mask.
 */
export declare function getMaskedFieldNextEditablePosition<TSection extends string, TRange extends MaskedFieldSectionRange<TSection>>(sectionRanges: TRange[], position: number, resolveEditablePositions: (sectionRange: TRange) => number[]): number | null;
/**
 * Resolve the sections targeted by the current delete or selection action.
 */
export declare function getMaskedFieldSectionsFromSelection<TSection extends string>(sectionRanges: MaskedFieldSectionRange<TSection>[], selectionStart: number, selectionEnd: number, key: 'Backspace' | 'Delete', options?: GetMaskedFieldSectionsFromSelectionOptions): TSection[];
/**
 * Prevent unsupported printable keys from mutating a protected masked field.
 */
export declare function preventInvalidMaskedPrintableKey(event: Pick<KeyboardEvent<HTMLElement>, 'altKey' | 'ctrlKey' | 'key' | 'metaKey' | 'preventDefault'>, allowedPrintableKeyPattern: RegExp): boolean;
export {};
//# sourceMappingURL=maskedFieldSections.d.ts.map