import { Ref } from "react"; import { View } from "react-native"; export type OTPInputAccessibilityValueText = (params: { valueLength: number; length: number; }) => string; type Props = { ref?: Ref; value: string; onValueChange: (value: string) => void; length: number; autocomplete?: boolean; onValidate?: (value: string) => boolean; errorMessage?: string; accessibilityLabel?: string; deleteButtonAccessibilityLabel?: string; accessibilityHint?: string; inputAccessoryViewID?: string; autoFocus?: boolean; }; export type OTPInputSecretProps = { secret: true; accessibilityValueText: OTPInputAccessibilityValueText; } | { secret?: false; accessibilityValueText?: OTPInputAccessibilityValueText; }; export type OTPInputProps = Props & OTPInputSecretProps; /** * `OTPInput` is a component that allows the user to enter a one-time password. * It has an hidden `TextInput` that is used to handle the keyboard and the focus. * The input handles the autocompletion of the OTP code. * @param value - The value of the OTP code * @param onValueChange - The function to call when the value changes * @param length - The length of the OTP code * @param secret - If the OTP code should be hidden * @param autocomplete - If the OTP code should be autocompleted * @param onValidate - The function to call when the OTP code is validated * @param errorMessage - The error message to display * @returns */ export declare const OTPInput: ({ value, onValueChange, length, accessibilityLabel, accessibilityHint, onValidate, errorMessage, autocomplete, inputAccessoryViewID, autoFocus, deleteButtonAccessibilityLabel, ref, ...props }: OTPInputProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=OTPInput.d.ts.map