// Shared components: Nav, Footer, Logo, Reveal, etc.
const { useState, useEffect, useRef, useMemo, useCallback } = React;
function Logo({ light=false, size=28 }){
// Render the brand wordmark; coral on light/dark backgrounds.
return (
);
}
function Reveal({ children, delay=0, className='' }){
const ref = useRef(null);
const [seen, setSeen] = useState(false);
useEffect(()=>{
const el = ref.current;
if(!el) return;
const io = new IntersectionObserver(([e])=>{
if(e.isIntersecting){ setSeen(true); io.disconnect(); }
}, { rootMargin:'0px 0px -10% 0px', threshold:0.1 });
io.observe(el);
return ()=>io.disconnect();
},[]);
return (
{children}
);
}
function Nav({ active, onNavigate, onBook, light=false }){
const [scrolled, setScrolled] = useState(false);
useEffect(()=>{
const f=()=>setScrolled(window.scrollY>30);
window.addEventListener('scroll', f, {passive:true});
f();
return ()=>window.removeEventListener('scroll', f);
},[]);
const items = [
{id:'collections', label:'Collections'},
{id:'designer', label:'The Designer'},
{id:'bespoke', label:'Bespoke'},
{id:'lookbook', label:'Lookbook'},
{id:'press', label:'Press'},
{id:'contact', label:'Contact'},
];
return (
);
}
function WhatsAppFab(){
return (
);
}
function Footer({ onNavigate }){
const C = window.PG_DATA.CONTACT;
return (
);
}
Object.assign(window, { Logo, Reveal, Nav, WhatsAppFab, Footer });