// common.jsx — constantes, ícones SVG, helpers compartilhados
const WA_LINK = "https://api.whatsapp.com/send/?phone=%2B5521986511926&text=Ol%C3%A1%21%20Vim%20pelo%20Site%20e%20gostaria%20de%20saber%20mais%20sobre%20o%20Bronze%20Tere&type=phone_number&app_absent=0&utm_source=site";
const { useState, useEffect, useRef } = React;
function useReveal() {
useEffect(() => {
const els = Array.from(document.querySelectorAll('.reveal'));
if (!('IntersectionObserver' in window)) {
els.forEach((e) => e.classList.add('in'));
return;
}
const io = new IntersectionObserver((entries) => {
entries.forEach((en) => {
if (en.isIntersecting) { en.target.classList.add('in'); io.unobserve(en.target); }
});
}, { threshold: 0.16, rootMargin: '0px 0px -8% 0px' });
els.forEach((e) => io.observe(e));
const t = setTimeout(() => els.forEach((e) => e.classList.add('in')), 2500);
return () => { io.disconnect(); clearTimeout(t); };
}, []);
}
const Ic = {
whatsapp: (p) => (),
shield: (p) => (),
heart: (p) => (),
drop: (p) => (),
sun: (p) => (),
pin: (p) => (),
check: (p) => (),
plus: (p) => (),
arrow: (p) => (),
starFill: (p) => (),
google: (p) => (),
};
function WaButton({ children, variant = "wa", className = "", icon = true }) {
return (
{icon && Ic.whatsapp()}
{children}
);
}
Object.assign(window, { WA_LINK, Ic, WaButton, useReveal });