const { Navbar, MobileMenu, Footer, Toast, SearchOverlay, TextInput, DatePicker, TravellerSelector, Tag } = window.VE; const LINKS = [ { label: 'Destinations', href: '#destinations' }, { label: 'Packages', href: '#packages' }, { label: 'Experiences', href: '#experiences' }, { label: 'About us', href: '#about' } ]; function App() { const [screen, setScreen] = React.useState('home'); const [destination, setDestination] = React.useState(null); const [pkg, setPkg] = React.useState(null); const [menu, setMenu] = React.useState(false); const [overlay, setOverlay] = React.useState(false); const [toast, setToast] = React.useState(null); const [isMobile, setIsMobile] = React.useState(false); const [search, setSearch] = React.useState({ destination: '', dates: '', travellers: '', activeField: null }); const [party, setParty] = React.useState({ adults: 2, children: 0, rooms: 1 }); const [dates, setDates] = React.useState({ start: null, end: null }); React.useEffect(() => { const onResize = () => setIsMobile(window.innerWidth < 744); onResize(); window.addEventListener('resize', onResize); return () => window.removeEventListener('resize', onResize); }, []); React.useEffect(() => { window.scrollTo(0, 0); }, [screen, destination, pkg]); const showToast = (message) => { setToast(message); window.setTimeout(() => setToast(null), 4000); }; const open = (next, payload) => { if (next === 'destination') setDestination(payload); if (next === 'package') setPkg(payload); setScreen(next === 'destination' ? 'destination' : next === 'package' ? 'package' : next); }; const navLinks = LINKS.map((l) => ({ label: l.label, href: l.href, active: (screen === 'listing' && l.label === 'Destinations') || (screen === 'package' && l.label === 'Packages') })); const onNavClick = (e) => { const label = e.target.textContent; if (label === 'Destinations' || label === 'Packages' || label === 'Experiences') { e.preventDefault(); setScreen('listing'); } }; return (