import { useState } from "react"; import { motion } from "framer-motion"; import { MIXED_BOOKING_PACKAGES, ROOM_TYPES, getFullPassPrice } from "@/data/event-data"; import type { RoomType } from "@/data/event-data"; import { useTranslation } from "react-i18next"; import { Check, Star, Circle, CheckCircle2, ExternalLink } from "lucide-react"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Label } from "@/components/ui/label"; import { Button } from "@/components/ui/button"; const FEATURED_PASS = "full"; const NON_HOTEL_FEE = 50; const PARTY_PRICE = 25; const MixedBookingSection = () => { const { t } = useTranslation(); const fullPassPricing = getFullPassPrice(); const [selectedRooms, setSelectedRooms] = useState>({ full: "individual", party: "individual", }); const [wantsHotel, setWantsHotel] = useState>({ full: null, party: null, }); return (

{t("mixedBooking.title")}

{t("mixedBooking.subtitle")}

{MIXED_BOOKING_PACKAGES.map((pkg, i) => { const selectedRoom = selectedRooms[pkg.id] || "individual"; const hasHotel = wantsHotel[pkg.id] === true; // Use dynamic pricing for Full Pass, fixed price for Party Pass // Only Full Pass has the +50€ non-hotel fee let basePrice = pkg.id === "full" ? fullPassPricing.price : PARTY_PRICE; let roomPrice = 0; if (hasHotel) { roomPrice = pkg.roomPrices[selectedRoom as keyof typeof pkg.roomPrices]; } const passPrice = pkg.id === "full" ? (hasHotel ? basePrice : basePrice + NON_HOTEL_FEE) : basePrice; const price = passPrice + roomPrice; const isFeatured = pkg.id === FEATURED_PASS; const isLastPrice = pkg.id === "full" && fullPassPricing.isLastPrice; const showNonHotelNote = pkg.id === "full" && !hasHotel && basePrice > 0; const features = t(`mixedBooking.${pkg.id}Features`).split("|").map((f: string) => f.trim()); return (
{isFeatured && ( {t("mixedBooking.popular")} )} {isLastPrice && ( {t("mixedBooking.lastPrice")} )}

{t(`mixedBooking.passTypes.${pkg.id}`)}

{t(`mixedBooking.${pkg.id}Description`)}

{price > 0 ? `${price}€` : t("mixedBooking.priceTBD")}

{t(`mixedBooking.passTypes.${pkg.id}`)}: {passPrice}€ {pkg.id === "full" ? t("mixedBooking.perPerson") : t("mixedBooking.perParty")}

{showNonHotelNote && (

{t("mixedBooking.nonHotelNote")}

)} {hasHotel && (

{t(`mixedBooking.roomTypes.${selectedRoom}`)}: {roomPrice}€

)}
{hasHotel && ( <> )}
    {features.map((feature: string, idx: number) => (
  • {feature}
  • ))}
); })}
); }; export default MixedBookingSection;