import type { CustomerSheetInitParams, CustomerSheetPresentParams, CustomerSheetResult, CustomerSheetError, StripeError } from '../types'; /** * Props */ export declare type Props = { /** Whether the sheet is visible. Defaults to false. */ visible: boolean; /** Called when the user submits, dismisses, or cancels the sheet, or when an error occurs. */ onResult: (result: CustomerSheetResult) => void; } & CustomerSheetInitParams & CustomerSheetPresentParams; /** * A component wrapper around the Customer Sheet functions. Upon passing `true` to the `visible` prop, * Customer Sheet will call `initialize` and `present`, and the result(s) will be passed through to the * onResult callback. * * @example * ```ts * const [selectedPaymentOption, setSelectedPaymentOption] = React.useState(null); * const [customerSheetVisible, setCustomerSheetVisible] = React.useState(false); * * return ( * { * setCustomerSheetVisible(false); * if (error) { * Alert.alert(error.code, error.localizedMessage); * } * if (paymentOption) { * setSelectedPaymentOption(paymentOption); * console.log(JSON.stringify(paymentOption, null, 2)); * } * if (paymentMethod) { * console.log(JSON.stringify(paymentMethod, null, 2)); * } * }} * /> * ); * ``` * @param __namedParameters Props * @returns JSX.Element * @category ReactComponents */ declare function CustomerSheet({ visible, presentationStyle, animationStyle, style, appearance, setupIntentClientSecret, customerId, customerEphemeralKeySecret, merchantDisplayName, headerTextForSelectionScreen, defaultBillingDetails, billingDetailsCollectionConfiguration, returnURL, removeSavedPaymentMethodMessage, applePayEnabled, googlePayEnabled, timeout, onResult, customerAdapter, }: Props): null; /** * The Customer Sheet is a prebuilt UI component that lets your customers manage their saved payment methods. */ export declare const CustomerSheetBeta: { CustomerSheet: typeof CustomerSheet; initialize: (params: CustomerSheetInitParams) => Promise<{ error?: StripeError; }>; present: (params?: CustomerSheetPresentParams) => Promise; retrievePaymentOptionSelection: () => Promise; }; export {};