import type { FormField } from '@funkit/connect-core'; import { type RefObject } from 'react'; import { TextInput, type TextInputProps } from 'react-native'; import { type FieldAutofill } from './fieldAutofill'; import type { KycFieldIssue } from './kycFormState'; /** * What the return key does at the end of a field. * * `next` hands focus on without dropping the keyboard; `done` ends the step, * because the last field has nowhere left to go. */ /** However the holder wants the box's node — a ref object or a callback. */ export type FieldInputRef = RefObject | ((node: TextInput | null) => void); export interface FieldReturnKey { kind: 'next' | 'done'; onPress: () => void; } export interface FiatFormFieldRowProps { field: FormField; value: string; /** Shown only once the page has been tried, so a blank form is quiet. */ issue?: KycFieldIssue; /** The step focuses through its fields, so it holds the first box's node. */ inputRef?: FieldInputRef; /** Absent on a field with nothing to type into. */ returnKey?: FieldReturnKey; /** Inside a section's card: the card fills and rounds it, so the box won't. */ editable?: boolean; autoFocus?: boolean; grouped?: boolean; /** A date a picker answers: the box shows the answer instead of taking it. */ picked?: FieldPicked; onChangeValue: (value: string) => void; onBlur: () => void; } /** A field answered by a picker rather than typed into. */ export interface FieldPicked { isOpen: boolean; onOpen: () => void; } /** * One field of a KYC form, drawn as the design draws its type. * * The label is the placeholder — the design has no label above the box — so a * field type this build has never seen still reads correctly from the server's * `labelFallback`. */ export declare function FiatFormFieldRow({ field, value, issue, inputRef, returnKey, grouped, editable, autoFocus, picked, onChangeValue, onBlur, }: FiatFormFieldRowProps): import("react").JSX.Element; /** * The design's field: a filled box with the label as its placeholder, and an * "optional" caption under the label where the form does not require it. */ export declare function FieldBox({ value, placeholder, optional, maxLength, align, keyboardType, inputRef, returnKey, grouped, editable, autoFocus, invalid, autofill, onChangeValue, onBlur, }: { value: string; placeholder: string; optional?: boolean; maxLength?: number; align?: 'left' | 'center'; keyboardType?: TextInputProps['keyboardType']; inputRef?: FieldInputRef; returnKey?: FieldReturnKey; editable?: boolean; autoFocus?: boolean; grouped?: boolean; /** A refused answer: the box takes the design's yellow. */ invalid?: boolean; autofill?: FieldAutofill; onChangeValue: (value: string) => void; onBlur: () => void; }): import("react").JSX.Element; //# sourceMappingURL=FiatFormFieldRow.d.ts.map