import type { MaybeRefOrGetter, Ref } from 'vue'; export interface OtpSlotData { char: string | null; compositionChar: string | null; placeholderChar: string | null; isActive: boolean; hasFakeCaret: boolean; } export interface OtpSelection { start: number; end: number; direction: 'forward' | 'backward' | 'none'; } export interface OtpSelectionInput { value: string; selectionStart: number | null; selectionEnd: number | null; selectionDirection: 'forward' | 'backward' | 'none' | null; maxLength: number; } export declare const OtpInputPatterns: { readonly numeric: RegExp; readonly alpha: RegExp; readonly alphanumeric: RegExp; readonly 'unicode-alpha': RegExp; readonly 'unicode-alphanumeric': RegExp; }; export type OtpInputPattern = keyof typeof OtpInputPatterns; export interface OtpInputOptions { value: Ref; length?: MaybeRefOrGetter; pattern?: MaybeRefOrGetter; type?: MaybeRefOrGetter<'text' | 'password' | 'number'>; masked?: MaybeRefOrGetter; placeholder?: MaybeRefOrGetter; isFocused?: Ref; } export interface OtpInputContext { value: Ref; length: Readonly>; slots: Readonly>; selection: Readonly>; composition: Readonly>; isComposing: Readonly>; isFocused: Ref; effectivePattern: Readonly>; inputMode: Readonly>; filter: (text: string) => string; isImeText: (text: string) => boolean; setValue: (text: string) => string; insert: (text: string, range?: { start: number; end: number; }) => string; deleteRange: (start: number, end: number) => string; bulkDelete: (isBackward: boolean) => string; syncSelection: (raw: OtpSelectionInput) => OtpSelection | null; setSelection: (start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none') => void; clearSelection: () => void; selectAtEnd: () => OtpSelection; selectSlot: (index: number) => OtpSelection; moveCaret: (direction: -1 | 1) => OtpSelection | null; extendSelection: (direction: -1 | 1) => OtpSelection | null; startComposition: () => void; updateComposition: (data: string) => void; endComposition: () => void; reset: () => void; } export declare function useOtpInput(options: OtpInputOptions): OtpInputContext;