function Header({ active, onNav }) { const [open, setOpen] = React.useState(false); const [scrolled, setScrolled] = React.useState(false); const settings = (window.SITE && window.SITE.settings) || {}; const navCfg = (window.SITE && window.SITE.nav) || {}; const waDigits = (settings.contact && settings.contact.whatsappDigits) || '5544999451010'; const waText = encodeURIComponent((settings.contact && settings.contact.whatsappDefaultText) || 'Olá! Gostaria de uma cotação de seguro.'); const eyebrow = (settings.brand && settings.brand.eyebrow) || 'Corretora · desde 1989'; const ctaLabel = navCfg.ctaLabel || 'Cotar agora'; const links = navCfg.links || [ { id: 'home', label: 'Início' }, { id: 'produtos', label: 'Seguros' }, { id: 'sobre', label: 'Sobre' }, { id: 'historia', label: 'História' }, { id: 'blog', label: 'Dicas' }, { id: 'contato', label: 'Contato' }, ]; React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); window.addEventListener('scroll', onScroll); return () => window.removeEventListener('scroll', onScroll); }, []); return (
{ e.preventDefault(); onNav('home'); }} aria-label="SOSSEG Corretora de Seguros — página inicial" style={{ display: 'flex', alignItems: 'center', gap: 12, }}> SOSSEG Corretora de Seguros
{eyebrow}
{ctaLabel}
{open && (
{links.map(l => ( { e.preventDefault(); onNav(l.id); setOpen(false); }} style={{ display: 'block', padding: '14px 4px', borderBottom: '1px solid var(--line)', fontSize: 16, fontWeight: 500 }}> {l.label} ))}
)}
); } function Logo() { return (
); } window.Header = Header; window.Logo = Logo;