import React, { useState, useEffect, useRef } from 'react'; import { motion } from 'motion/react'; import { Button } from '../ui/button'; import { Badge } from '../ui/badge'; import { Card, CardContent } from '../ui/card'; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from '../ui/dialog'; import { Input } from '../ui/input'; import { Label } from '../ui/label'; import { Textarea } from '../ui/textarea'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'; import { ImageWithFallback } from '../figma/ImageWithFallback'; import { navigateTo } from '../Router'; import { BrandedTag } from '../about/BrandedTag'; import { PrimaryCTAButton } from '../PrimaryCTAButton'; import { TestimonialsSection } from '../TestimonialsSection'; import { CTABannerSection } from '../CTABannerSection'; // import ImageWithFallback from "./ImageWithFallback"; // your custom component import { ArrowRight, CheckCircle, Calendar, Download, Building, Monitor, BookOpen, Heart, Briefcase, Users, Target, Network, MapPin, Coffee, Wifi, Car, Shield, Play, ChevronLeft, ChevronRight, Eye, X, Clock, Star, Mail, Phone, Globe, Maximize2, TreePine, Bed } from 'lucide-react'; const images = [ "https://images.unsplash.com/photo-1590490360182-c33d57733427?w=1920&h=1080&fit=crop", "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=1920&h=1080&fit=crop", "https://images.unsplash.com/photo-1557682224-5b8590cd9ec5?w=1920&h=1080&fit=crop", ]; const settings = { dots: false, infinite: true, speed: 2000, autoplay: true, autoplaySpeed: 4000, slidesToShow: 1, slidesToScroll: 1, fade: true, // smooth fade transition arrows: false, }; const offerings = [ { title: "Training Halls & Spaces", description: "State-of-the-art training facilities designed for optimal learning experiences", icon: Building, features: ["4 fully-equipped halls", "Flexible seating arrangements", "Advanced AV systems", "Natural lighting"] }, { title: "Technology Infrastructure", description: "Cutting-edge technology to support modern learning and collaboration", icon: Monitor, features: ["High-speed connectivity", "Interactive displays", "Video conferencing", "Digital whiteboards"] }, { title: "Learning Resources", description: "Comprehensive resources and materials to enhance the learning experience", icon: BookOpen, features: ["Digital library access", "Learning materials", "Resource centers", "Study spaces"] }, { title: "Wellness & Recreation", description: "Facilities focused on participant well-being and relaxation during programs", icon: Heart, features: ["Wellness areas", "Recreation spaces", "Quiet zones", "Outdoor areas"] } ]; const targetAudience = [ { title: "Corporate Teams", description: "Organizations seeking immersive learning experiences for their leadership development programs", icon: Briefcase, characteristics: ["Team retreats", "Leadership programs", "Skills workshops", "Strategic planning"] }, { title: "Learning Groups", description: "Educational institutions and learning organizations hosting intensive development sessions", icon: Users, characteristics: ["Educational programs", "Intensive workshops", "Collaborative learning", "Group development"] }, { title: "Professional Networks", description: "Professional associations and networks organizing development events and conferences", icon: Network, characteristics: ["Professional development", "Networking events", "Industry conferences", "Skill building"] } ]; const facilityFeatures = [ { title: "Prime Location", description: "Strategically located campus with easy accessibility and beautiful surroundings", icon: MapPin, details: ["Central location", "Easy transport access", "Scenic environment", "Quiet setting"] }, { title: "Accommodation", description: "Comfortable residential facilities for extended learning programs", icon: Building, details: ["On-site accommodation", "Private rooms", "Shared facilities", "24/7 security"] }, { title: "Catering Services", description: "Professional catering services providing nutritious and delicious meals", icon: Coffee, details: ["Breakfast included", "Lunch & dinner options", "Dietary accommodations", "Coffee & refreshments"] }, { title: "Support Services", description: "Comprehensive support services to ensure smooth program delivery", icon: Shield, details: ["Technical support", "Event coordination", "Housekeeping", "Medical assistance"] }, { title: "Technology Infrastructure", description: "State-of-the-art technology to support modern learning experiences", icon: Monitor, details: ["High-speed Wi-Fi", "Smart boards", "Video conferencing", "Audio-visual systems"] }, { title: "Wellness Facilities", description: "Dedicated spaces for relaxation and well-being during intensive programs", icon: Heart, details: ["Meditation rooms", "Fitness area", "Outdoor spaces", "Quiet zones"] }, { title: "Meeting Spaces", description: "Flexible spaces designed for collaboration and group discussions", icon: Users, details: ["Breakout rooms", "Collaboration areas", "Board rooms", "Informal spaces"] }, { title: "Learning Resources", description: "Comprehensive resources and materials to enhance the learning experience", icon: BookOpen, details: ["Digital library", "Resource center", "Study materials", "Reference books"] } ]; const amenities = [ { name: "High-Speed Wi-Fi", icon: Wifi }, { name: "Parking Facilities", icon: Car }, { name: "Coffee Lounge", icon: Coffee }, { name: "Security Services", icon: Shield }, { name: "Recreation Areas", icon: Heart }, { name: "Study Spaces", icon: BookOpen }, { name: "Meeting Rooms", icon: Users }, { name: "Tech Support", icon: Monitor } ]; // Virtual Tour Data const virtualTourStops = [ { id: 'training-amphitheater', title: 'Training Amphitheater', description: 'Inspire your audience in our largest training space featuring tiered seating and state-of-the-art presentation technology.', image: 'https://images.unsplash.com/photo-1526045004414-3e7ed02f9ca1?w=1080&h=720&fit=crop', capacity: '80-120 attendees', keyHighlight: 'Large-Scale Training Excellence', zone: 1, features: [ 'Tiered amphitheater seating', 'Professional stage', 'Advanced acoustics', 'Multiple screens', 'Live streaming capability' ] }, { id: 'collaboration-suites', title: 'Collaboration Suites', description: 'Foster deep connections and intensive learning in our intimate spaces perfect for small group work and coaching sessions.', image: 'https://images.unsplash.com/photo-1592565276431-c27e6ad5f46a?w=1080&h=720&fit=crop', capacity: '4-8 participants', keyHighlight: 'Intimate Learning Environment', zone: 2, features: [ 'Comfortable seating', 'Natural light', 'Privacy glass', 'Dedicated workspace', 'Tea/coffee station' ] }, { id: 'outdoor-pavilion', title: 'Outdoor Learning Pavilion', description: 'Connect with nature while learning in our unique outdoor space that combines fresh air with professional learning environments.', image: 'https://images.unsplash.com/photo-1571624436279-b272adf752b5?w=800&h=600&fit=crop', capacity: '20-40 participants', keyHighlight: 'Nature-Connected Learning', zone: 3, features: [ 'Weather-protected pavilion', 'Garden views', 'Fresh air environment', 'Flexible seating', 'Natural acoustics' ] }, { id: 'residential-quarters', title: 'Residential Quarters', description: 'Extend your learning journey with comfortable accommodation for multi-day programs featuring hotel-standard amenities.', image: 'https://images.unsplash.com/photo-1590490360182-c33d57733427?w=800&h=600&fit=crop', capacity: '40 single occupancy rooms', keyHighlight: 'Premium Residential Experience', zone: 4, features: [ 'Private en-suite rooms', 'Work desk and chair', 'High-speed WiFi', 'Air conditioning', 'Garden/courtyard views' ] }, { id: 'executive-boardroom', title: 'Executive Boardroom', description: 'Host high-level strategic discussions in our sophisticated boardroom designed for executive leadership meetings.', image: 'https://images.unsplash.com/photo-1497366216548-37526070297c?w=1080&h=720&fit=crop', capacity: '12-16 executives', keyHighlight: 'Strategic Leadership Hub', zone: 5, features: [ 'Premium boardroom table', 'Executive seating', '4K presentation displays', 'Secure video conferencing', 'Integrated sound system' ] }, { id: 'innovation-lab', title: 'Innovation Lab', description: 'Spark creativity and innovation in our flexible workspace designed for design thinking and collaborative problem-solving.', image: 'https://images.unsplash.com/photo-1497366412874-3415097a27e7?w=1080&h=720&fit=crop', capacity: '15-25 participants', keyHighlight: 'Creative Collaboration Space', zone: 6, features: [ 'Modular furniture setup', 'Whiteboard walls', 'Breakout alcoves', 'Technology integration', 'Flexible lighting' ] }, { id: 'wellness-retreat', title: 'Wellness & Reflection Area', description: 'Recharge and reflect in our tranquil wellness space designed for mindfulness and personal development sessions.', image: 'https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=1080&h=720&fit=crop', capacity: '8-15 participants', keyHighlight: 'Mindful Leadership Development', zone: 7, features: [ 'Meditation seating area', 'Natural lighting', 'Acoustic privacy', 'Aromatherapy system', 'Garden views' ] }, { id: 'digital-learning-studio', title: 'Digital Learning Studio', description: 'Experience cutting-edge digital learning with our high-tech studio equipped for virtual reality and interactive sessions.', image: 'https://images.unsplash.com/photo-1560472354-b33ff0c44a43?w=1080&h=720&fit=crop', capacity: '10-20 participants', keyHighlight: 'Future of Learning Technology', zone: 8, features: [ 'VR/AR capabilities', 'Interactive displays', 'Recording equipment', 'Livestream setup', 'Digital collaboration tools' ] } ]; // Booking Form Interface interface BookingForm { companyName: string; contactName: string; email: string; phone: string; role: string; teamSize: string; facilityZone: string; additionalRequirements: string; } export function LearningFacility() { // Facility Features Carousel state and functionality const [currentSlide, setCurrentSlide] = useState(0); const carouselRef = useRef(null); // Virtual Tour Carousel state and functionality const [currentTourSlide, setCurrentTourSlide] = useState(0); const tourCarouselRef = useRef(null); // Responsive carousel settings const getCarouselSettings = () => { if (typeof window !== 'undefined') { if (window.innerWidth >= 1200) { return { cardsPerView: 3, cardWidth: 33.333, slideWidth: 33.333 }; } else if (window.innerWidth >= 768) { return { cardsPerView: 2, cardWidth: 50, slideWidth: 50 }; } else { return { cardsPerView: 1, cardWidth: 100, slideWidth: 100 }; } } return { cardsPerView: 3, cardWidth: 33.333, slideWidth: 33.333 }; }; // Virtual tour carousel settings const getTourCarouselSettings = () => { if (typeof window !== 'undefined') { if (window.innerWidth >= 1200) { return { cardsPerView: 5, cardWidth: 20, slideWidth: 20 }; } else if (window.innerWidth >= 768) { return { cardsPerView: 3, cardWidth: 33.333, slideWidth: 33.333 }; } else { return { cardsPerView: 1, cardWidth: 100, slideWidth: 100 }; } } return { cardsPerView: 5, cardWidth: 20, slideWidth: 20 }; }; const [carouselSettings, setCarouselSettings] = useState(getCarouselSettings()); const [tourCarouselSettings, setTourCarouselSettings] = useState(getTourCarouselSettings()); const { cardsPerView, cardWidth, slideWidth } = carouselSettings; const { cardsPerView: tourCardsPerView, cardWidth: tourCardWidth, slideWidth: tourSlideWidth } = tourCarouselSettings; const maxSlide = Math.max(0, facilityFeatures.length - cardsPerView); const maxTourSlide = Math.max(0, virtualTourStops.length - tourCardsPerView); // Handle window resize useEffect(() => { const handleResize = () => { setCarouselSettings(getCarouselSettings()); setTourCarouselSettings(getTourCarouselSettings()); setCurrentSlide(0); // Reset to first slide on resize setCurrentTourSlide(0); // Reset tour carousel on resize }; window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); const scrollLeft = () => { if (currentSlide > 0) { setCurrentSlide(currentSlide - 1); } }; const scrollRight = () => { if (currentSlide < maxSlide) { setCurrentSlide(currentSlide + 1); } }; // Virtual Tour Carousel navigation const scrollTourLeft = () => { if (currentTourSlide > 0) { setCurrentTourSlide(currentTourSlide - 1); } }; const scrollTourRight = () => { if (currentTourSlide < maxTourSlide) { setCurrentTourSlide(currentTourSlide + 1); } }; const [currentTourStop, setCurrentTourStop] = useState(0); const [isVirtualTourActive, setIsVirtualTourActive] = useState(false); const [isBookingModalOpen, setIsBookingModalOpen] = useState(false); const [expandedTourCard, setExpandedTourCard] = useState(null); const [bookingForm, setBookingForm] = useState({ companyName: '', contactName: '', email: '', phone: '', role: '', teamSize: '', facilityZone: '', additionalRequirements: '' }); useEffect(() => { console.log('LearningFacility component mounted'); // Debug log window.scrollTo(0, 0); // Listen for custom booking modal event from CTAPopupModal const handleOpenBookingModal = () => { console.log('Custom booking modal event received'); // Debug log setIsBookingModalOpen(true); }; window.addEventListener('openBookingModal', handleOpenBookingModal); // Also check if we should auto-open the booking modal based on URL parameters const urlParams = new URLSearchParams(window.location.search); if (urlParams.get('autoBooking') === 'true') { console.log('Auto-opening booking modal from URL parameter'); // Debug log setTimeout(() => setIsBookingModalOpen(true), 100); } return () => { window.removeEventListener('openBookingModal', handleOpenBookingModal); }; }, []); const handleStartTour = () => { setIsVirtualTourActive(true); setCurrentTourStop(0); }; const handleNextStop = () => { if (currentTourStop < virtualTourStops.length - 1) { setCurrentTourStop(currentTourStop + 1); } }; const handlePrevStop = () => { if (currentTourStop > 0) { setCurrentTourStop(currentTourStop - 1); } }; const handleJumpToStop = (index: number) => { setCurrentTourStop(index); }; const handleBookingSubmit = (e: React.FormEvent) => { e.preventDefault(); console.log('Booking submitted:', bookingForm); setIsBookingModalOpen(false); setBookingForm({ companyName: '', contactName: '', email: '', phone: '', role: '', teamSize: '', facilityZone: '', additionalRequirements: '' }); // Clean up URL parameter const url = new URL(window.location.href); url.searchParams.delete('autoBooking'); window.history.replaceState({}, '', url.toString()); // Here you would typically send the booking request to your backend alert('Booking request submitted successfully! We will contact you within 24 hours.'); }; const handleBookingModalClose = (open: boolean) => { console.log('Booking modal close triggered, open:', open); // Debug log setIsBookingModalOpen(open); if (!open) { // Clean up URL parameter when closing const url = new URL(window.location.href); url.searchParams.delete('autoBooking'); window.history.replaceState({}, '', url.toString()); } }; return (
{/* Hero Section */} {/* Service-style hero: full-bleed image with dark gradient, centered content, and stat strip */}
{/* Background image + overlay */}
{/* Centered content */}
World-Class Facility

Learning Facility

A purpose-built campus for immersive leadership learning. State-of-the-art facilities designed to foster transformation, collaboration, and growth.

{/* Stat strip */}
2 Acres
Campus Size
80
Max Capacity
4
Training Halls
{/* What We Offer Section */}

What We Offer

Comprehensive executive leadership development solutions designed to transform senior leadership capabilities and drive organizational excellence.

{/* Match Services page layout: sticky left content + vertical scroll-in cards on the right */}
{/* Left: Sticky intro */}

Spaces and Services that Enable Transformation

Purpose-built environments, technology, resources, and wellness support that make immersive leadership programs seamless and effective.

{/* Right: Stacked cards with staggered on-scroll animation */}
{offerings.map((offering, index) => { const Icon = offering.icon; return (

{offering.title}

{offering.description}

{offering.features.map((feature, featureIndex) => (
{feature}
))}
); })}
{/* Who It's For Section - match Services page (left intro + right accordion list) */}
{/* Our Expertise "Our Services" style - horizontal carousel cards */}
{/* Header with eyebrow and controls */}
LEARNING FACILITY

Who It's For

Our learning facility supports immersive leadership programs for corporate teams, learning groups, and professional networks seeking high-impact environments.

{/* Simple controls that scroll the container; no state changes outside this section */}
01 / {String(targetAudience.length).padStart(2, '0')}
{/* Carousel */}
{/* Facility Features Section */}

Facility Features

Every aspect of our facility is designed to enhance learning outcomes and provide an exceptional experience for participants and facilitators.

{/* Navigation Controls - Bottom right positioning */}
{String(currentSlide + 1).padStart(2, '0')} / {String(Math.ceil(facilityFeatures.length / cardsPerView)).padStart(2, '0')}
{/* Carousel Container */}
{/* Navigation Controls - Positioned at bottom right */} {/* Carousel Container */}
{facilityFeatures.map((feature, index) => { const Icon = feature.icon; return (

{feature.title}

{feature.description}

{feature.details.map((detail, detailIndex) => (
{detail}
))}
); })}
{/* Amenities Section */}

World-Class Amenities

Premium amenities and services to ensure comfort, productivity, and an exceptional learning environment for all participants.

{[0, 1].map((loop) => (
{amenities.map((amenity, index) => { const Icon = amenity.icon; return (
{amenity.name}
); })}
))}
{[0, 1].map((loop) => (
{amenities.map((amenity, index) => { const Icon = amenity.icon; return (
{amenity.name}
); })}
))}
{/* Virtual Tour Section */}
{!isVirtualTourActive ? ( /* Tour Preview */
{/* Header Section - left aligned with navigation controls */}

Explore Our Learning Spaces

Take an interactive tour of our eight distinct learning environments, each designed to inspire transformation and foster collaboration.

{/* Navigation Controls - Bottom right positioning */}
{String(currentTourSlide + 1).padStart(2, '0')} / {String(Math.ceil(virtualTourStops.length / tourCardsPerView)).padStart(2, '0')}
{/* Carousel Container */}
{virtualTourStops.map((stop) => (
setExpandedTourCard(stop.id)} > {/* Image background */}
{/* Gradient overlay for legibility */}
{/* Glass badge (Zone) */}
Zone {stop.zone}
{/* Text overlay inside the image */}

{stop.title}

{stop.description}

))}
{/* Start Tour CTA */}
Preview complete? Launch the full interactive tour to navigate each zone.
) : ( /* Active Virtual Tour */
{/* Tour Header */}
Interactive Virtual Tour

{virtualTourStops[currentTourStop].title}

{virtualTourStops[currentTourStop].description}

{/* Tour Image */}
{/* Navigation Arrows */} {/* Stop Indicator */}
{currentTourStop + 1} of {virtualTourStops.length}
{/* Tour Features */}

Key Features

{virtualTourStops[currentTourStop].features.map((feature, index) => (
{feature}
))}

Space Details

Zone {virtualTourStops[currentTourStop].zone}
Campus Location
{virtualTourStops[currentTourStop].capacity}
Capacity
{/* Tour Navigation */}
{virtualTourStops.map((_, index) => (
{/* End Tour Button */}
)} {/* Tour Card Modal */} setExpandedTourCard(null)}> {expandedTourCard && ( <>
{virtualTourStops.find(stop => stop.id === expandedTourCard)?.title} Explore this learning space in detail. You can start an interactive tour from this location or book this specific area for your next event.
{/* Featured Image */}
stop.id === expandedTourCard)?.image || ''} alt={virtualTourStops.find(stop => stop.id === expandedTourCard)?.title || ''} className="w-full h-full object-cover" />
{virtualTourStops.find(stop => stop.id === expandedTourCard)?.keyHighlight}
{/* Description */}

{virtualTourStops.find(stop => stop.id === expandedTourCard)?.description}

{/* Action Buttons */}
)}
{/* Booking Modal */} Book Learning Facility Submit your facility booking request with your preferred dates, team size, and specific requirements. We'll contact you within 24 hours to confirm availability and discuss details.
setBookingForm({ ...bookingForm, companyName: e.target.value })} required />
setBookingForm({ ...bookingForm, contactName: e.target.value })} required />
setBookingForm({ ...bookingForm, email: e.target.value })} required />
setBookingForm({ ...bookingForm, phone: e.target.value })} required />
setBookingForm({ ...bookingForm, role: e.target.value })} required />