import React from 'react'; import { BookingType, TimeSlot } from '@/types/bookings'; interface BookingSummaryProps { selectedBookingTypeData: BookingType | undefined; selectedDate: string; selectedTimeSlot: string; timeSlots: TimeSlot[]; participantsCount: number; onSubmit: () => void; } const BookingSummary: React.FC = ({ selectedBookingTypeData, selectedDate, selectedTimeSlot, timeSlots, participantsCount, onSubmit, }) => { const selectedTimeSlotData = timeSlots.find(s => s.id === selectedTimeSlot); // Format time to display in Tbilisi timezone (UTC+4) const formatTime = (time: string) => { if (time.match(/^\d{2}:\d{2}$/)) { return time; } if (time.includes('T') || time.includes(' ') || time.includes('Z')) { const date = new Date(time); return date.toLocaleTimeString('en-US', { timeZone: 'Asia/Tbilisi', hour12: false, hour: '2-digit', minute: '2-digit' }); } return time; }; return (

Booking Summary

Experience: {selectedBookingTypeData?.display_name}
Date: {selectedDate}
Time: {selectedTimeSlotData?.start_time && selectedTimeSlotData?.end_time ? `${formatTime(selectedTimeSlotData.start_time)}—${formatTime(selectedTimeSlotData.end_time)}` : 'Not selected' }
Participants: {participantsCount}
{selectedBookingTypeData?.requires_payment && (
Total: ₾{selectedBookingTypeData.price_per_person * participantsCount}
)}
); }; export default BookingSummary;