/* global React */ const { useState, useEffect, useRef } = React; // Hook: in-view detection for scroll reveals function useInView(options = { threshold: 0.15, once: true }) { const ref = useRef(null); const [inView, setInView] = useState(false); useEffect(() => { if (!ref.current) return; const obs = new IntersectionObserver((entries) => { entries.forEach((e) => { if (e.isIntersecting) { setInView(true); if (options.once) obs.disconnect(); } else if (!options.once) { setInView(false); } }); }, { threshold: options.threshold || 0.15 }); obs.observe(ref.current); return () => obs.disconnect(); }, []); return [ref, inView]; } function Reveal({ children, delay = 0, className = "", as: Tag = "div", ...rest }) { const [ref, inView] = useInView(); const cls = `reveal ${inView ? "in" : ""} ${delay ? `delay-${delay}` : ""} ${className}`.trim(); return {children}; } const WA_LINK = "https://wa.me/5511985993244?text=Ol%C3%A1%20Dra.%20Fernanda%2C%20gostaria%20de%20agendar%20uma%20consulta."; const ArrowDiagonal = ({ size = 14 }) => ( ); const DiamondIcon = ({ size = 14 }) => ( ); const StarRow = () => ( ★ ★ ★ ★ ★ ); function Cta({ children = "Agendar consulta", href = WA_LINK, ...rest }) { return ( {children} ); } window.useInView = useInView; window.Reveal = Reveal; window.Cta = Cta; window.ArrowDiagonal = ArrowDiagonal; window.DiamondIcon = DiamondIcon; window.StarRow = StarRow; window.WA_LINK = WA_LINK;