/* global React */ const { useEffect, useState, useRef } = React; // ── ARCTMIND wordmark / mark ──────────────────────────────── function Mark({ size = 22, color }) { const c = color || "var(--accent)"; return ( ); } function Wordmark({ size = 22, dark = false }) { return ( arct·mind ); } // ── Nav ───────────────────────────────────────────────────── function Nav({ active }) { const [mobileOpen, setMobileOpen] = useState(false); const links = [ { href: "pages/como-funciona.html", label: "Como funciona", id: "como" }, { href: "pages/conectores.html", label: "Conectores", id: "conectores" }, { href: "pages/precos.html", label: "Preços", id: "precos" }, { href: "pages/segmentos.html", label: "Segmentos", id: "segmentos" }, { href: "pages/sobre.html", label: "Sobre", id: "sobre" }, ]; const inPages = typeof window !== "undefined" && window.location.pathname.includes("/pages/"); const fix = (h) => { if (h === "index.html") return inPages ? "../index.html" : "index.html"; if (inPages) return h.replace("pages/", ""); return h; }; useEffect(() => { if (mobileOpen) document.body.style.overflow = "hidden"; else document.body.style.overflow = ""; return () => { document.body.style.overflow = ""; }; }, [mobileOpen]); return (
ARCTMIND
Falar com vendas Começar grátis
{mobileOpen && (
setMobileOpen(false)}> {links.map(l => ( {l.label} ))}
Começar grátis · 14 dias
)}
); } // ── Footer ────────────────────────────────────────────────── function Footer() { const inPages = typeof window !== "undefined" && window.location.pathname.includes("/pages/"); const fix = (h) => { if (h === "index.html") return inPages ? "../index.html" : "index.html"; if (inPages) return h.replace("pages/", ""); return h; }; const cols = [ { title: "EMPRESA", items: [ ["Sobre", "pages/sobre.html"], ["Contato", "pages/contato.html"], ["Carreiras", "pages/carreiras.html"], ["Segurança", "pages/seguranca.html"], ]}, { title: "RECURSOS", items: [ ["Documentação", "pages/documentacao.html"], ["Status", "pages/status.html"], ["Changelog", "pages/changelog.html"], ["Conectores", "pages/conectores.html"], ]}, { title: "LEGAL", items: [ ["Privacidade (LGPD)", "pages/privacidade.html"], ["Termos de Uso", "pages/termos.html"], ["DPA", "pages/dpa.html"], ["Política de Cookies", "pages/cookies.html"], ]}, ]; return ( ); } // ── Reveal-on-scroll wrapper ─────────────────────────────── function useReveal() { useEffect(() => { const els = document.querySelectorAll(".reveal"); if (!("IntersectionObserver" in window)) { els.forEach(e => e.classList.add("in")); return; } const io = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } }); }, { threshold: 0.12, rootMargin: "0px 0px -40px 0px" }); els.forEach(el => io.observe(el)); return () => io.disconnect(); }, []); } // ── BRL formatter ────────────────────────────────────────── function fmtBRL(n) { return n.toLocaleString("pt-BR", { style: "currency", currency: "BRL", maximumFractionDigits: 0 }); } // ── Severity badge ───────────────────────────────────────── function SeverityBadge({ level }) { const map = { critico: { label: "Crítico", cls: "tag-critical" }, alto: { label: "Alto", cls: "tag-warning" }, medio: { label: "Médio", cls: "tag-muted" }, info: { label: "Info", cls: "tag-accent" }, }; const m = map[level] || map.medio; return {m.label}; } // ── Tiny sparkline ───────────────────────────────────────── function Sparkline({ values, w = 96, h = 28, color, fill }) { const c = color || "var(--accent)"; const max = Math.max(...values), min = Math.min(...values); const span = max - min || 1; const stepX = w / (values.length - 1); const pts = values.map((v, i) => `${i * stepX},${h - ((v - min) / span) * (h - 4) - 2}`).join(" "); return ( {fill && } ); } // expose Object.assign(window, { Mark, Wordmark, Nav, Footer, useReveal, fmtBRL, SeverityBadge, Sparkline });