import type { HostComponent, ViewProps } from 'react-native'; import type { DirectEventHandler, Int32, } from 'react-native/Libraries/Types/CodegenTypes'; import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { Details, Placeholders, Styles, } from '../types/components/CardFieldInput'; import type { UnsafeMixed } from './utils'; type CardChangeEvent = Readonly<{ card: UnsafeMixed
; }>; export type FocusChangeEvent = Readonly<{ focusedField: string; }>; export interface NativeProps extends ViewProps { autofocus: boolean; cardStyle: UnsafeMixed; countryCode?: string; dangerouslyGetFullCardDetails: boolean; disabled: boolean; onBehalfOf?: string; onCardChange?: DirectEventHandler; onFocusChange?: DirectEventHandler; placeholders: UnsafeMixed; postalCodeEnabled: boolean; preferredNetworks?: ReadonlyArray; } type ComponentType = HostComponent; interface NativeCommands { blur: (viewRef: React.ElementRef) => void; focus: (viewRef: React.ElementRef) => void; clear: (viewRef: React.ElementRef) => void; } export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['blur', 'focus', 'clear'], }); export default codegenNativeComponent( 'CardField' ) as ComponentType;