// HeroVoiceAgent.jsx - Hero interface for the page-level AI. // Nutzt denselben Voice-Blob wie der globale Agent (window.AISN_AGENT.mountOrb), // mit den 4 Funnel-Optionen als Satelliten. Klick oeffnet den Audio-Dialog. (function () { const { useRef, useEffect } = React; const C = { ink: '#0A0A0B', surface2: '#1A1B22', text: '#E7E9EE', muted: '#8A8F99', mint: '#5EEAD4', indigo: '#818CF8', rose: '#F472B6', sand: '#FBBF77', sans: "'Inter Tight', system-ui, sans-serif", mono: "'IBM Plex Mono', monospace" }; function HeroVoiceAgent({ lang }) { const orbRef = useRef(null); const done = useRef(false); useEffect(() => { let n = 0; const iv = setInterval(() => { if (done.current) { clearInterval(iv); return; } if (window.AISN_AGENT && window.AISN_AGENT.mountOrb && orbRef.current) { orbRef.current.innerHTML = ''; window.AISN_AGENT.mountOrb(orbRef.current, 230); done.current = true; clearInterval(iv); } else if (++n > 60) clearInterval(iv); }, 150); return () => clearInterval(iv); }, []); const open = (k) => { if (window.AISN_AGENT) window.AISN_AGENT.open(k); }; const L = lang === 'en' ? [{ k: 'need', l: 'Name need', c: C.mint }, { k: 'workers', l: 'See employees', c: C.indigo }, { k: 'check', l: 'Check start', c: C.rose }, { k: 'contact', l: 'Prepare enquiry', c: C.sand }] : [{ k: 'need', l: 'Bedarf nennen', c: C.mint }, { k: 'workers', l: 'Mitarbeiter sehen', c: C.indigo }, { k: 'check', l: 'Start pruefen', c: C.rose }, { k: 'contact', l: 'Anfrage vorbereiten', c: C.sand }]; const live = lang === 'en' ? 'Live - voice assistant' : 'Live - Sprach-Assistent'; const hint = lang === 'en' ? 'Speak or type - the AI guides you.' : 'Sprechen oder tippen - die KI fuehrt Sie.'; const pos = [ { top: '0%', left: '50%', tx: '-50%', ty: '0' }, { top: '50%', left: '100%', tx: '-100%', ty: '-50%' }, { top: '100%', left: '50%', tx: '-50%', ty: '-100%' }, { top: '50%', left: '0%', tx: '0', ty: '-50%' }, ]; return (
{/* rotating rings */}
{/* connector lines */} {[[50, 4], [96, 50], [50, 96], [4, 50]].map((p, i) => ( ))} {/* center voice blob */} {/* satellites */} {L.map((o, i) => ( ))}
{/* caption + mode hint (audio first, text optional) */}
{live}
{hint}
); } window.HeroVoiceAgent = HeroVoiceAgent; })();