'use client' import React, { useState } from 'react'; import { Calendar, Clock, User, Mail, Users } from 'lucide-react'; const BookingInterface = () => { const [selectedDate, setSelectedDate] = useState(''); const [selectedTimeSlot, setSelectedTimeSlot] = useState(''); const [selectedBookingType, setSelectedBookingType] = useState(''); const [customerName, setCustomerName] = useState(''); const [customerEmail, setCustomerEmail] = useState(''); const [participantsCount, setParticipantsCount] = useState(1); // Mock data - will be replaced with API calls const bookingTypes = [ { id: '1', name: 'wheel_rental', display_name: 'Wheel Rental', requires_payment: false, price_per_person: 0 }, { id: '2', name: 'hand_building', display_name: 'Hand Building Coworking', requires_payment: false, price_per_person: 0 }, { id: '3', name: 'personal_workshop', display_name: 'Personal Workshop', requires_payment: true, price_per_person: 75 }, { id: '4', name: 'group_workshop', display_name: 'Group Workshop', requires_payment: true, price_per_person: 50 } ]; // Mock available time slots const timeSlots = [ { id: '1', start_time: '09:00', end_time: '11:00', available: true }, { id: '2', start_time: '11:30', end_time: '13:30', available: true }, { id: '3', start_time: '14:00', end_time: '16:00', available: false }, { id: '4', start_time: '16:30', end_time: '18:30', available: true }, { id: '5', start_time: '19:00', end_time: '21:00', available: true } ]; const selectedBookingTypeData = bookingTypes.find(bt => bt.id === selectedBookingType); const handleSubmit = () => { console.log({ selectedBookingType, selectedDate, selectedTimeSlot, customerName, customerEmail, participantsCount }); }; const generateCalendarDays = () => { const today = new Date(); const days = []; for (let i = 0; i < 14; i++) { const date = new Date(today); date.setDate(today.getDate() + i); days.push({ date: date.toISOString().split('T')[0], day: date.getDate(), month: date.toLocaleDateString('en', { month: 'short' }), dayName: date.toLocaleDateString('en', { weekday: 'short' }) }); } return days; }; const calendarDays = generateCalendarDays(); return (
Choose your pottery experience