/// import { AddressEntry, ElementEventArgument, ElementSourceEventArgument, PaymentRequest, PaymentRequestShippingOption, UpdatePaymentRequest } from "../../types"; /** * ApplePay component is used to create and manage the Apple Pay button. * * @component * @see https://docs.digitalriver.com/digital-river-api/general-resources/reference/elements/apple-pay-elements * * @param {ApplePayProps} props - Properties passed to the component. * @param {string} props.elementId - The ID of the HTML element where the Apple Pay button will be mounted. * @param {ApplePayPaymentRequest} props.paymentRequest - The payment request object for the Apple Pay session. * @param {function} props.onReady - Callback function that is called when the Apple Pay button is ready. * @param {function} props.onClick - Callback function that is called when the Apple Pay button is clicked. * @param {function} props.onCancel - Callback function that is called when the Apple Pay session is cancelled. * @param {function} props.onError - Callback function that is called when an error occurs. * @param {function} props.onShippingAddressChange - Callback function that is called when the shipping address is changed. * @param {function} props.onShippingOptionChange - Callback function that is called when the shipping option is changed. * @param {function} props.onSuccess - Callback function that is called when the payment is successful. * @returns {JSX.Element} A span element with the specified ID where the Apple Pay button will be mounted. */ export declare const ApplePay: ({ elementId, paymentRequest, onReady, onClick, onCancel, onError, onShippingAddressChange, onShippingOptionChange, onSuccess, }: ApplePayProps) => JSX.Element; /** * @typedef ApplePayProps * @property {string} elementId - The ID of the HTML element where the Apple Pay button will be mounted. * @property {ApplePayPaymentRequest} paymentRequest - The payment request object for the Apple Pay session. * @property {function} onReady - Callback function that is called when the Apple Pay button is ready. * @property {function} onClick - Callback function that is called when the Apple Pay button is clicked. * @property {function} onCancel - Callback function that is called when the Apple Pay session is cancelled. * @property {function} onError - Callback function that is called when an error occurs. * @property {function} onShippingAddressChange - Callback function that is called when the shipping address is changed. * @property {function} onShippingOptionChange - Callback function that is called when the shipping option is changed. * @property {function} onSuccess - Callback function that is called when the payment is successful. */ export interface ApplePayProps { elementId?: string | undefined; paymentRequest: ApplePayPaymentRequest; onReady?(data: ElementEventArgument): void; onCancel?(data: ElementEventArgument): void; onClick?(data: ApplePayClickEvent): void; onShippingOptionChange?(data: ApplePayShippingOptionChangeEvent): void; onShippingAddressChange?(data: ApplePayShippingAddressChangeEvent): void; onSuccess?(source: ElementSourceEventArgument): void; onError?(error: Error | any): void; } export interface ApplePayShippingOptionChangeEvent { shippingOption: PaymentRequestShippingOption; updateWith(data: UpdatePaymentRequest): void; } export interface ApplePayShippingAddressChangeEvent { shippingAddress: AddressEntry; updateWith(data: UpdatePaymentRequest): void; } export interface ApplePayClickEvent extends ElementEventArgument { updateWith(data: ApplePayPaymentRequest): void; } export interface ApplePayPaymentRequest extends PaymentRequest { style?: ApplePayStyle; } export interface ApplePayStyle { buttonType?: ApplePayButtonType; buttonColor?: ApplePayButtonColor; buttonLanguage?: string; } export declare enum ApplePayButtonColor { Dark = "dark", Light = "light", LightOutline = "light-outline" } export declare enum ApplePayButtonType { Plain = "plain", Buy = "buy" } //# sourceMappingURL=applePay.d.ts.map