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 { AddressDetails, AddressSheetError, PaymentSheet, StripeError, } from '../types'; import type { UnsafeMixed } from './utils'; type CollectAddressResult = Required; type AddressSheetErrorEvent = Readonly<{ error: UnsafeMixed>; }>; type AdditionalFields = Readonly<{ phoneNumber?: string; checkboxLabel?: string; }>; type OnSubmitActionEvent = Readonly<{ result: UnsafeMixed; }>; export interface NativeProps extends ViewProps { visible: boolean; presentationStyle?: WithDefault; animationStyle?: WithDefault; appearance?: UnsafeMixed; defaultValues?: UnsafeMixed; additionalFields?: UnsafeMixed; allowedCountries?: Array; autocompleteCountries?: Array; primaryButtonTitle?: string; sheetTitle?: string; googlePlacesApiKey?: string; onSubmitAction: DirectEventHandler; onErrorAction: DirectEventHandler; } type ComponentType = HostComponent; export default codegenNativeComponent( 'AddressSheetView' ) as ComponentType;