import FormDeparturePointsSelect from "@/components/form/components/related/form-departure-point-select"; import FormItem from "@/components/form/form-item"; import { Badge } from "@/components/ui/badge/badge"; import Card from "@/components/ui/card/card"; import type { LIconProps } from "@/components/ui/lucid-icon/lucid-icon"; import LIcon from "@/components/ui/lucid-icon/lucid-icon"; import CoreSummaryCollapseInformationProps from "@/features/core/summary/components/core-summary-collapse-information"; import CustomerChildInfoFormItems from "@/features/customer/customer-info/child-customer-info-form/child-customer-info-form"; import CustomerInfoFormItems from "@/features/customer/customer-info/customer-info-form/customer-info-form"; import CustomerInfoSelectInput from "@/features/customer/customer-info-select/customer-info-select-input"; import { useApp } from "@/hooks/useApp"; import { useLocale } from "@/hooks/useLocale"; import { requiredRule } from "@/validations/form-rules/rules/required-rule"; import type { ICoreSummaryPassenger } from "../types/core-summary.types"; interface CoreSummaryPassengerGroupProps { groupTitle?: string; groupKey: string; groupProperties?: { iconName: LIconProps["name"]; title: string; }[]; passengers: ICoreSummaryPassenger[]; hasMilesCode?: boolean; onMilesCodesChange?: (userId: string, milesCode: string) => void; hasPassportInfos?: boolean; hasDeparturePoint?: boolean; hasBadge?: boolean; hasReservationNote?: boolean; showIdentityWarning?: boolean; cancellationPolicy?: { key?: any; icon?: any; description: string; tooltip: string; refundable: boolean; cartDescription?: any; }; } const CoreSummaryPassengerGroup = (props: CoreSummaryPassengerGroupProps) => { const { isReady, isB2C, isOtel } = useApp(); const { t } = useLocale(); if (!isReady) return null; return (

{props.groupTitle}

{props.groupProperties && (
{props.groupProperties.map((groupProperty) => (
{groupProperty.title}
))}
)}

{t("Guest Information")}

{t( "We will forward your reservation information via e-mail and free SMS.", )}

{props.passengers .filter((x) => x.type === "employee") .map((employee, employeeIndex) => ( {({ field, setValue }) => ( setValue(value)} label={t("{{count}}. adult", { count: employeeIndex + 1 })} showMilesCodeInput={props.hasMilesCode} onMilesChange={(milesCode) => { props.onMilesCodesChange?.(field.value, milesCode); }} /> )} ))} {props.passengers .filter((x) => x.type === "guest") .map((guest, guestIndex) => (

{t("{{count}}. adult information", { count: guestIndex + 1 })}

{props.hasBadge && ( {guest.label} )}
{props.hasReservationNote && guestIndex === 0 && (

{t( "We will forward your reservation information via e-mail and free SMS.", )}

)} {props.hasDeparturePoint && (

Hareket Noktası seçimi

Tura katılacağınız şehir ve hareket noktası seçimini yapın.

)}
))} {props.passengers .filter((x) => x.type === "child") .map((child, childIndex) => (

{childIndex + 1} {t(". Child")}

{isB2C || isOtel ? ( ) : ( )}
))}
{props.cancellationPolicy && (isB2C || isOtel) && (

{t("Cancellation Policy")}

)}
); }; export default CoreSummaryPassengerGroup;