import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@radix-ui/react-accordion";
import type { PropsWithChildren } from "react";
import Card from "@/components/ui/card/card";
import { FlightBrand, FlightTime } from "../../flight-card/flight-card";
export type RezervationInfo = {
label: string;
value: string;
icon?: React.ReactNode;
};
interface PriceDescription {
description: string;
price: string;
}
interface RezervationSummaryFlightPriceProps {
priceDescription: PriceDescription[];
}
interface RezervationInfoProps {
data: RezervationInfo[];
}
export interface BookingRequestRezervationInformationProps
extends PropsWithChildren {}
interface RezervationSuccessTotalPriceProps {
price: string;
}
const RezervationFlightInfo = ({ data }: RezervationInfoProps) => {
return (
{data.map((item, index) => (
{item.label}
{item.icon && item.icon}
{item.value}
))}
);
};
interface RezervationFlightCardProps {
destination: string;
origin: string;
date: string;
logoSrc: string;
brandName: string;
flightCode: string;
totalFlightHours: string;
flightStartTime: string;
startIATACode: string;
endStartTime: string;
endIATACode: string;
transferInformation: string;
transferIATACodes?: string;
totalPrice?: string;
}
const RezervationFlightCard = ({
destination,
origin,
date,
logoSrc,
brandName,
flightCode,
totalFlightHours,
flightStartTime,
startIATACode,
endStartTime,
endIATACode,
transferInformation,
transferIATACodes,
totalPrice,
}: RezervationFlightCardProps) => {
return (
{`${origin} - ${destination}`}
{date}
{/*
*/}
{totalPrice && (
Toplam Tutar
{totalPrice}
)}
);
};
const RezervationSuccessFlightPriceDescription = ({
description,
price,
}: PriceDescription) => {
return (
{description}
{price}
);
};
const RezervationSuccessFlightPrice = ({
priceDescription,
}: RezervationSummaryFlightPriceProps) => {
return (
Fiyat Özeti
{priceDescription.map((item, index) => (
))}
);
};
const RezervationSuccessTotalPrice = ({
price,
}: RezervationSuccessTotalPriceProps) => {
return (
Toplam Tutar
{price}
);
};
const BookingRequestRezervationInformation = ({
children,
}: BookingRequestRezervationInformationProps) => {
return (
Rezervasyon Bilgileri
{children}
);
};
export {
BookingRequestRezervationInformation,
RezervationFlightCard,
RezervationFlightInfo,
RezervationSuccessFlightPrice,
RezervationSuccessTotalPrice,
};