import { FormData, FormErrors } from '../../types/common/FormData.type'; import { FormTouched } from '../../types/common/FormTouched.type'; export type FocusableField = 'email' | 'phoneNumber' | 'cardNumber' | 'cardExpiry' | 'cardCvv' | 'name'; export interface Focusable { focus: () => void; } /** * FocusManager handles the auto-focus progression feature * It tracks field focus and validity to determine when to * automatically move focus to the next field in sequence */ export declare class FocusManager { private focusSequence; private currentFocusIndex; private fields; private fieldValidState; private previousFieldValidState; /** * Register a field with the focus manager */ registerField(fieldName: FocusableField, field: Focusable): void; /** * Handle field focus events */ handleFieldFocus(fieldName: FocusableField): void; /** * Update the validation state of fields based on form state */ handleStateUpdate(formData: Partial, errors: FormErrors, touched: Partial): void; /** * Check if any fields have transitioned from invalid to valid and progress focus if needed */ private checkForValidTransitions; /** * Focus the next field in sequence */ private focusNextField; /** * Focus a specific field by its index in the sequence */ focusFieldByIndex(index: number): void; /** * Apply focus to the current field based on focus index */ private applyFocusToCurrentField; /** * Focus the card number field (first field) * Used for setting initial focus on page load */ focusCardNumberField(): void; /** * Focus a specific field by name * Used for manual focus control (e.g., Tab key navigation) */ focusField(fieldName: FocusableField): void; } //# sourceMappingURL=FocusManager.d.ts.map