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 (