/* Hero animated flow diagram - Cliente WhatsApp -> IA -> CRM -> Follow-up -> Venda */ const { useEffect, useRef, useState } = React; function StatusDot({ color = '#22c55e' }) { return ( ); } function HeroFlow() { const [tick, setTick] = useState(0); useEffect(() => { const id = setInterval(() => setTick(t => (t + 1) % 5), 1600); return () => clearInterval(id); }, []); const nodes = [ { id: 0, label: 'WhatsApp', sub: 'Cliente: "Vocês entregam?"', tag: 'Cliente', color: '#22c55e' }, { id: 1, label: 'Agente IA', sub: 'Intent: pedido • Confiança 0.96', tag: 'IA', color: '#2563EB' }, { id: 2, label: 'CRM', sub: 'Lead criado • Marina S.', tag: 'CRM', color: '#5CE1E6' }, { id: 3, label: 'Follow-up', sub: 'Mensagem agendada • 24h', tag: 'Auto', color: '#C6A15B' }, { id: 4, label: 'Venda', sub: 'Pedido #2148 • R$ 187,90', tag: 'Receita', color: '#22c55e' } ]; return (
{/* top header */}
dominus / pipeline / live
operacional
{/* flow */}
{/* connecting line */} {nodes.map((n, i) => ( ))}
{/* live ticker / events */}
14:32:08 ›
uptime 99.98%
); } function FlowNode({ n, active, next }) { return (
{n.tag}
{n.label}
{n.sub}
{/* arrow indicator */} {n.id < 4 && (
)}
); } function EventTicker({ tick, nodes }) { const events = [ 'WhatsApp inbound · "boa tarde, vocês entregam?"', 'IA classificou intenção: pedido · 96%', 'Lead criado no CRM · Marina S. · 3 itens', 'Follow-up agendado · template_promo_24h', 'Pedido confirmado · R$ 187,90 · #2148' ]; return {events[tick]}; } window.HeroFlow = HeroFlow;