/* ============================================================ AI Roadmap Quiz — Main App Component Loads as type="text/babel". Reads from window.QUIZ. ============================================================ */ const { useState, useEffect, useMemo, useRef } = React; const Q = window.QUIZ; /* ---------- ICONS (lucide-style, stroke-based) ---------- */ const Icon = ({ name, size = 20, ...props }) => { const s = { stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }; const paths = { arrow: <>, back: <>, }; return ( {paths[name]} ); }; /* ---------- SPLASH SCREEN ---------- */ const SplashScreen = ({ onStart }) => (
fiftyminds

Intro to AI
Discovery Questions

This helps us understand your organisation's current AI setup and future plans.

); /* ---------- DETAILS SCREEN ---------- */ const DetailsScreen = ({ values, onChange, onNext, onBack, stepNum, stepTotal }) => { const valid = !!values.employees; return (

How many people are in the organisation?

); }; /* ---------- QUESTION SCREEN ---------- */ const QuestionScreen = ({ q, qIndex, total, value, onChange, onNext, onBack, stepNum, stepTotal }) => { if (q.multiSelect) { const sel = (value && value.selected) ? value.selected : []; const otherText = (value && value.other != null) ? value.other : ''; const noneIdx = q.options.findIndex(o => o.exclusive); const toggle = (i) => { if (q.options[i].exclusive) { onChange({ selected: sel.includes(i) ? [] : [i], other: '' }); } else { const newSel = sel.includes(i) ? sel.filter(s => s !== i) : [...sel.filter(s => s !== noneIdx), i]; onChange({ selected: newSel, other: otherText }); } }; const setOther = (text) => { onChange({ selected: sel.filter(s => s !== noneIdx), other: text }); }; const valid = sel.length > 0 || otherText.trim().length > 0; return (

{q.question}

{q.options.map((opt, i) => ( ))} {q.hasOther && (
{otherText.trim() && ( )} setOther(e.target.value)} />
)}
); } if (q.freeText) { return (

{q.question}