/* eslint-disable */ /* Vivaah Weddings — shared site components. Loaded with Exports to window: Wordmark, Nav, Footer, WhatsAppFab, useScroll, useTweakSync */ const { useState, useEffect, useRef, useCallback, useMemo, createContext, useContext } = React; /* ------------------------------------------------------------ Wordmark — V I V A A H + optional script accent ------------------------------------------------------------ */ function Wordmark({ size = 24, script = true, sub = "Destination Weddings", color }) { return ( {script ? ( Vivaah ) : ( VIVAAH )} {sub ? {sub} : null} ); } /* ------------------------------------------------------------ Nav ------------------------------------------------------------ */ function Nav({ active = "home", variant = "paper", scriptMark = true }) { const [scrolled, setScrolled] = useState(false); const [lang, setLang] = useState(() => document.documentElement.getAttribute('dir') === 'rtl' ? 'ar' : 'en'); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 12); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const toggleLang = () => { const next = lang === 'en' ? 'ar' : 'en'; setLang(next); document.documentElement.setAttribute('dir', next === 'ar' ? 'rtl' : 'ltr'); document.documentElement.setAttribute('lang', next); }; const items = [ { id: 'home', label: 'Home', href: 'Home.html' }, { id: 'real-weddings', label: 'Real Weddings', href: 'Real Weddings.html' }, { id: 'services', label: 'Services', href: 'Home.html#services', secondary: true }, { id: 'destinations', label: 'Destinations', href: 'Home.html#destinations', secondary: true }, { id: 'about', label: 'About', href: 'Home.html#about', secondary: true }, { id: 'contact', label: 'Contact', href: 'Contact.html' }, ]; return ( ); } /* ------------------------------------------------------------ Footer ------------------------------------------------------------ */ function Footer() { return ( ); } /* ------------------------------------------------------------ WhatsApp FAB ------------------------------------------------------------ */ function WhatsAppFab() { return ( WhatsApp ); } /* ------------------------------------------------------------ Stars row (decorative) ------------------------------------------------------------ */ function Stars({ count = 5 }) { return ( {Array.from({ length: 5 }).map((_, i) => ( ))} ); } /* ------------------------------------------------------------ Tweaks sync helper — applies stored tweak values to CSS vars / DOM ------------------------------------------------------------ */ function applyTweaks(t) { const r = document.documentElement; const accent = (Array.isArray(t.accent) ? t.accent[0] : t.accent) || '#B08D57'; const accentInk = (Array.isArray(t.accent) ? t.accent[1] : t.accentInk) || accent; r.style.setProperty('--accent', accent); r.style.setProperty('--accent-ink', accentInk); if (t.display) { const map = { 'Cormorant': "'Cormorant Garamond', serif", 'Playfair': "'Playfair Display', serif", 'Italiana': "'Italiana', serif", }; r.style.setProperty('--display', map[t.display] || map.Cormorant); } if (t.density) r.setAttribute('data-density', t.density); if (typeof t.lang === 'string') { r.setAttribute('dir', t.lang === 'ar' ? 'rtl' : 'ltr'); r.setAttribute('lang', t.lang); } // hero treatment broadcast document.querySelectorAll('[data-hero]').forEach(el => { if (t.hero) el.setAttribute('data-treatment', t.hero); }); } /* Expose to global */ Object.assign(window, { Wordmark, Nav, Footer, WhatsAppFab, Stars, applyTweaks });