/** Form types used by auth SDK form components. */
import type { ComponentProps, KeyboardEvent } from 'react';
import { DoctPhoneInput } from 'docthub-core-components';
import type { Control, FieldValues } from 'react-hook-form';
/** Base props shared by RHF form field components. */
export interface BaseFormFieldProps {
    /** Field name used by react-hook-form for registration and validation. */
    name: string;
    /** Visible label rendered above or beside the input. */
    label?: string;
    /** Placeholder text shown when the input is empty. */
    placeholder?: string;
    /** Whether the field is required for form submission. */
    required?: boolean;
    /** Whether the field is disabled (non-interactive). */
    disabled?: boolean;
    /** Additional CSS class name(s) applied to the field wrapper. */
    className?: string;
    /** Validation error message to display below the input. */
    error?: string;
    /** Supplementary helper text shown below the input when there is no error. */
    helperText?: string;
    /** Focus this field when form/screen opens (PRODUCT_PROTOCOLS #26). */
    autoFocus?: boolean;
}
/** Props for the text/email/number input field component. */
export interface RHFInputFieldProps extends BaseFormFieldProps {
    /** HTML input type. Allowed: `'text'`, `'email'`, `'password'`, `'number'`, `'tel'`, `'url'`, `'search'`. */
    type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
    /** HTML `autocomplete` attribute value (e.g. `'email'`, `'tel'`). */
    autoComplete?: string;
    /** Maximum character length enforced on the input. */
    maxLength?: number;
    /** Minimum character length enforced on the input. */
    minLength?: number;
    /** Regex pattern string for native HTML validation. */
    pattern?: string;
    /** react-hook-form `Control` instance. When omitted, the field uses the nearest `FormProvider`. */
    control?: Control<FieldValues>;
    /** Called when a key is pressed while the input is focused. */
    onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
    /** When true, restricts input to numeric characters only. */
    numericOnly?: boolean;
}
/** Props for RHF wrapper around DoctPhoneInput (docthub-core-components). */
type DoctPhoneInputProps = ComponentProps<typeof DoctPhoneInput>;
/** Props for RHF wrapper around DoctPhoneInput (docthub-core-components). */
export interface RHFDoctPhoneInputFieldProps extends BaseFormFieldProps, Omit<DoctPhoneInputProps, 'id' | 'name' | 'value' | 'error' | 'helperText' | 'onBlur' | 'onPhoneChange'> {
    /** Country code used when no `countryCodeName` field is configured (e.g. `'91'`). */
    countryCode?: string;
    /** Optional RHF field that stores country code independently. */
    countryCodeName?: string;
    /** Optional RHF field that stores the `DoctPhoneInput` values object. */
    phoneArrayName?: string;
    /** Optional RHF field that stores selected country metadata. */
    selectedCountryName?: string;
    /** react-hook-form `Control` instance. When omitted, the field uses the nearest `FormProvider`. */
    control?: Control<FieldValues>;
}
/** Props for the OTP input field component. */
export interface RHFOtpInputFieldProps extends BaseFormFieldProps {
    /** Number of OTP digit boxes to render. @default 6 */
    length?: number;
    /** Input type for each OTP box: `'text'`, `'number'`, or `'password'` (masked). */
    type?: 'text' | 'number' | 'password';
    /** Focus the first OTP box on mount. */
    autoFocus?: boolean;
    /** Automatically trigger submission when all boxes are filled. */
    autoSubmit?: boolean;
    /** Called with the complete OTP string once all boxes are filled. */
    onComplete?: (otp: string) => void;
    /** CSS class name(s) applied to each individual OTP input box. */
    inputClassName?: string;
    /** react-hook-form `Control` instance. When omitted, the field uses the nearest `FormProvider`. */
    control?: Control<FieldValues>;
}
export {};
