@qite/tide-booking-component
Version:
React Booking wizard & Booking product component for Tide
45 lines (44 loc) • 1.54 kB
TypeScript
import React, { ReactNode } from 'react';
import { SummaryCheckbox, TravelersFormValues } from '../../booking-wizard/types';
export interface SummaryNotification {
id: number;
title?: string | null;
description?: string | null;
hasToBeConfirmed?: boolean;
isConfirmed?: boolean;
}
export interface SummaryVoucherState {
code?: string;
isValidated?: boolean;
isValid?: boolean;
}
export interface SharedSummaryProps {
translations: any;
travelerFormValues: TravelersFormValues;
checkboxes?: SummaryCheckbox[] | null;
notifications?: SummaryNotification[] | null;
remarks?: string;
voucher?: SummaryVoucherState;
voucherCodes?: string[];
enableVoucher?: boolean;
allowOption?: boolean;
isOffer?: boolean;
customValidateText?: string;
isSubmitting?: boolean;
skipPayment?: boolean;
userValidated?: boolean;
renderOptions: () => ReactNode;
renderPreviousButton: () => ReactNode;
renderLoader?: () => ReactNode;
onSubmit: React.FormEventHandler<HTMLFormElement>;
onRemarksChange?: (text: string) => void;
onCheckboxesChange?: (checkboxes: SummaryCheckbox[]) => void;
onNotificationsChange?: (notifications: SummaryNotification[]) => void;
onVoucherChange?: (voucher: SummaryVoucherState) => void;
onValidateVoucher?: () => void;
onAddVoucher?: React.MouseEventHandler<HTMLButtonElement>;
onRemoveVoucher?: (code: string) => void;
onUserValidatedChange?: (isValid: boolean) => void;
}
declare const SharedSummary: React.FC<SharedSummaryProps>;
export default SharedSummary;