import type { StartPaymentRequest } from "../types/payment"; import type { StartPayResponse } from "../types/response"; import type { ButtonHTMLAttributes, MouseEvent, ReactNode } from "react"; export type StartPayButtonCallback = (response: StartPayResponse) => void; export type StartPayButtonClickHandler = (event: MouseEvent, controls: StartPayButtonRenderProps) => void | Promise; export type StartPayButtonRenderProps = { loading: boolean; disabled: boolean; lastStatus: StartPayResponse["status"] | null; start: () => Promise; launchPaymentFlow: () => Promise; }; export type StartPayButtonProps = StartPaymentRequest & Omit, "children" | "disabled" | "onClick"> & { disabled?: boolean; autoStart?: boolean; loadingText?: string; successText?: string; failureText?: string; children?: ReactNode | ((props: StartPayButtonRenderProps) => ReactNode); onClick?: StartPayButtonClickHandler; onPaymentAuthorized?: StartPayButtonCallback; onPaymentDeclined?: StartPayButtonCallback; onPaymentPendingReview?: StartPayButtonCallback; onPaymentAborted?: StartPayButtonCallback; onPaymentException?: StartPayButtonCallback; onPaymentSettled?: StartPayButtonCallback; onSuccess?: StartPayButtonCallback; onFailure?: StartPayButtonCallback; onPending?: StartPayButtonCallback; onCancel?: StartPayButtonCallback; onError?: StartPayButtonCallback; }; export declare const StartPayButton: ({ amount, currency, orderId, customer, metadata, callbackUrl, returnUrl, paymentMethods, timeout, signal, disabled, autoStart, loadingText, successText, failureText, children, onClick, onPaymentAuthorized, onPaymentDeclined, onPaymentPendingReview, onPaymentAborted, onPaymentException, onPaymentSettled, onSuccess, onFailure, onPending, onCancel, onError, ...buttonProps }: StartPayButtonProps) => import("react").JSX.Element; //# sourceMappingURL=StartPayButton.d.ts.map