import type { HostComponent, ViewProps } from 'react-native'; import type { DirectEventHandler, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { CardActionError, GooglePayCardToken, StripeError, } from '../types'; import type { UnsafeMixed, ImageSource } from './utils'; type AddToWalletButtonCompleteEvent = Readonly<{ error: UnsafeMixed> | null; }>; type CardDetails = Readonly<{ primaryAccountIdentifier: string | null; name: string; description: string; lastFour?: string; brand?: string; }>; export interface NativeProps extends ViewProps { iOSButtonStyle?: WithDefault; androidAssetSource: ImageSource; testEnv?: boolean; cardDetails: UnsafeMixed; token?: UnsafeMixed | null; ephemeralKey: UnsafeMixed; onCompleteAction?: DirectEventHandler; } type ComponentType = HostComponent; export default codegenNativeComponent( 'AddToWalletButton' ) as ComponentType;