// Interactive 60-second diagnostic. // User answers 4 questions, each option contributes weighted scores to // up to four offerings. At the end we surface the highest-scored one. function Diagnostico() { const [lang] = useLang(); const C = window.FUSE_CONTENT.diagnostico; const OFERTAS = window.FUSE_CONTENT.ofertas.items; const questions = C.questions[lang]; const [step, setStep] = React.useState(0); const [answers, setAnswers] = React.useState([]); const total = questions.length; const done = step >= total; // Aggregate weights to pick top offering const winner = React.useMemo(() => { if (!done) return null; const score = { diagnostico: 0, motor: 0, infra: 0, retainer: 0 }; answers.forEach(a => { Object.entries(a.weight).forEach(([k, v]) => { score[k] = (score[k] || 0) + v; }); }); const sorted = Object.entries(score).sort((a, b) => b[1] - a[1]); const topId = sorted[0][0]; const topOferta = OFERTAS.find(o => o.id === topId); return { score, topId, topOferta }; }, [done, answers]); const choose = (opt) => { setAnswers(prev => [...prev, opt]); setStep(s => s + 1); }; const reset = () => { setStep(0); setAnswers([]); }; // Custom rationale strings const rationale = (id) => { const map = { es: { diagnostico: 'Antes de invertir en construir, te conviene entender qué tenés y qué te falta. El diagnóstico es de baja fricción y la mayoría de los clientes lo usan como entrada.', motor: 'Tus pérdidas más costosas están del lado comercial. El motor comercial sistematiza captación, calificación, seguimiento y propuestas — en 6–8 semanas, funcionando.', infra: 'El conocimiento y los procesos operacionales son el cuello de botella. Conocimiento estructurado + copilots específicos + automatización crítica, opcionalmente con RAG privado.', retainer: 'Ya tenés el sistema funcionando. Lo que necesitás es iteración sostenida, mejoras incrementales y acceso directo para lo urgente.', }, en: { diagnostico: 'Before investing in building, it pays to understand what you have and what\'s missing. The diagnostic is low-friction and most clients use it as the entry point.', motor: 'Your costliest leaks are on the commercial side. The commercial engine systematizes capture, qualification, follow-up and proposals — in 6–8 weeks, running.', infra: 'Knowledge and operational processes are the bottleneck. Structured knowledge + firm-specific copilots + critical automation, optionally with private RAG.', retainer: 'You already have the system running. What you need is sustained iteration, incremental improvements, and direct access for the urgent stuff.', }, }; return map[lang][id]; }; return (
{C.kicker[lang]}

{C.h2[lang][0]} {C.h2[lang][1]}{C.h2[lang][2]}

{C.body[lang]}

{/* Progress bar */}
{questions.map((_, i) => ( ))}
{!done && (
{lang === 'es' ? 'Pregunta' : 'Question'} {String(step + 1).padStart(2, '0')} / {String(total).padStart(2, '0')}

{questions[step].q}

    {questions[step].options.map((opt, i) => (
  • ))}
{step > 0 && ( )}
)} {done && winner && (
{C.result[lang].intro}
{lang === 'es' ? 'Para tu firma, empezaría con' : 'For your firm, I\'d start with'}

{winner.topOferta.num} — {winner.topOferta.title[lang]}

{rationale(winner.topId)}

{lang === 'es' ? 'Duración' : 'Duration'}
{winner.topOferta.duration[lang]}
{lang === 'es' ? 'Precio (Latam)' : 'Price (Latam)'}
{winner.topOferta.price.latam}
{lang === 'es' ? 'Precio (US)' : 'Price (US)'}
{winner.topOferta.price.us}
{C.result[lang].cta} →
{/* Mini breakdown */}
{OFERTAS.map(o => { const v = winner.score[o.id] || 0; const max = Math.max(...Object.values(winner.score), 1); const pct = (v / max) * 100; const isTop = o.id === winner.topId; return (
{o.num} · {o.title[lang]}
); })}

{lang === 'es' ? 'Esto es indicativo, no un contrato. Lo confirmamos en la primera conversación.' : 'This is indicative, not a contract. We confirm it in the first conversation.'}

)}
); } window.Diagnostico = Diagnostico;