import { EBookingPaymentMethod, IBookingPayment } from '@roomstay/core';
import { ReactNode } from 'react';
import { IRadioButtonOption } from '../../components/generic/RadioButtonGroup/RadioButtonGroup';
export type PaymentHandler = {
    name: string;
    /** If the payment option should be considered. It doesn't mean it will be selectable yet */
    isAvailable: boolean;
    isDisabled?: boolean;
    disabledReason?: string;
    requireFormFilled?: boolean;
    /** Payment handler will only be selectable if booking has been placed */
    requireBookingPlaced: boolean;
    /**
     * Exclusive payment methods will be displayed separately from all others.
     * Only one exclusive payment handler will execute. This depends on the order of the handlers.
     */
    isExclusive: boolean;
    /**
     * An exclusive payment method may have its own confirm/pay button
     */
    hasCustomConfirmButton?: boolean;
    bookingPaymentMethod: EBookingPaymentMethod;
    subOptions?: IRadioButtonOption[];
    getBookingPaymentRequestObject: () => Promise<IBookingPayment>;
    onSelect?: () => void;
    renderInput?: () => JSX.Element;
    renderPaymentInput?: () => ReactNode | undefined;
    onConfirm: () => Promise<{
        success: boolean;
        message: string;
        data?: Partial<IBookingPayment> | any;
    }>;
    onSubOptionChange?: (value?: string) => void;
};
export interface PaymentHandlerElementRef {
    submitPayment: (args?: any) => ReturnType<PaymentHandler['onConfirm']>;
}
