import React, { type JSX } from "react"; import type { ButtonProps } from "../types"; import type { UseLPMOneTimePaymentSessionProps } from "../hooks/useLPMOneTimePaymentSession"; export type LPMOneTimePaymentButtonProps = UseLPMOneTimePaymentSessionProps & ButtonProps & { /** * Optional initial values to prefill the rendered payment fields, keyed by * field type (e.g. `{ name: "John Doe", email: "john@example.com" }`). * Maps to the SDK `createPaymentFields({ value })` option. * * Pass a stable reference (e.g. from `useState`/`useMemo`, or defined * outside the component) rather than an inline object literal — a new * object on every render will re-run the payment fields effect below. */ fieldValues?: Record; /** * Optional CSS styles applied to each field's container `
`. * Defaults to `{ marginBottom: 8 }` when not provided. */ fieldContainerStyle?: React.CSSProperties; /** * Optional CSS class name applied to each field's container `
`. */ fieldContainerClassName?: string; }; /** * `LPMOneTimePaymentButton` renders the LPM payment fields and button * in a self-contained component — matching the same merchant experience as * `PayPalOneTimePaymentButton`. Fields (e.g. Full Name) are rendered * internally above the button; no manual `session.createPaymentFields()` needed. * * @example * { return { orderId: "..." }; }} * onApprove={async (data) => { /* capture *\/ }} * /> */ export declare const LPMOneTimePaymentButton: ({ lpm, type, disabled, fieldValues, fieldContainerStyle, fieldContainerClassName, ...hookProps }: LPMOneTimePaymentButtonProps) => JSX.Element | null;