import React from 'react'; import { User, Users } from 'lucide-react'; import { UseFormRegister, FieldErrors } from 'react-hook-form'; import { useTranslations } from 'next-intl'; import { BookingType } from '@/types/bookings'; interface FormData { customerName: string; customerEmail: string; participantsCount: number; } interface CustomerDetailsProps { register: UseFormRegister; errors: FieldErrors; participantsCount: number; onParticipantsCountChange: (count: number) => void; bookingType: BookingType; } const CustomerDetails: React.FC = ({ register, errors, participantsCount, onParticipantsCountChange, bookingType, }) => { const t = useTranslations('bookingForm'); // Calculate min and max based on booking type const minParticipants = bookingType.min_participants_capacity; const maxParticipants = bookingType.max_participants_capacity; return (

Your Details

{errors.customerName && (

{errors.customerName.message}

)}
{errors.customerEmail && (

{errors.customerEmail.message}

)}
{participantsCount}
participant{participantsCount > 1 ? 's' : ''}
Min: {minParticipants} • Max: {maxParticipants}
); }; export default CustomerDetails;