// Embedded-site variant of the Claude Design app.jsx. // Wraps the hub + per-assistant flows in a single compact "sheet" container. // Sources: /tmp/hysio-demo-design/ui-mockup/project/src/app.jsx (standalone version). const { useState, useEffect } = React; function App() { const assistants = window.ASSISTANTS; const [currentId, setCurrentId] = useState(() => { try { return localStorage.getItem('hysio-demo-view') || 'hub'; } catch { return 'hub'; } }); const [subId, setSubId] = useState(() => { try { return localStorage.getItem('hysio-demo-sub') || null; } catch { return null; } }); const speedMul = 1; useEffect(() => { try { localStorage.setItem('hysio-demo-view', currentId); } catch {} }, [currentId]); useEffect(() => { try { if (subId) localStorage.setItem('hysio-demo-sub', subId); } catch {} }, [subId]); const scrollToSheet = () => { try { const el = document.querySelector('.hysio-demo-sheet'); if (!el) return; const reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; el.scrollIntoView({ behavior: reduce ? 'auto' : 'smooth', block: 'start' }); } catch {} }; const pickAssistant = (id) => { setCurrentId(id); if (id === 'hub') { setSubId(null); scrollToSheet(); return; } const a = assistants.find((x) => x.id === id); if (a) setSubId(a.sub[0].id); scrollToSheet(); }; const goHome = () => { setCurrentId('hub'); setSubId(null); scrollToSheet(); }; const current = currentId === 'hub' ? null : assistants.find((a) => a.id === currentId); const currentSub = current ? (current.sub.find((s) => s.id === subId && s.processing) || current.sub.find((s) => s.processing) || current.sub[0]) : null; const hubAssistants = assistants.map((a) => ({ ...a, shortName: a.name.replace('Hysio ', ''), number: a.num, tagline: a.tagline, pillar: a.id === 'scribe' ? 'Flagship' : null, sub: a.sub.map((s) => s.name.replace('Hysio ', '').replace('SmartMail ', '')), })); const nextIdx = currentId !== 'hub' ? (assistants.findIndex((a) => a.id === currentId) + 1) % assistants.length : 0; const nextAssistant = assistants[nextIdx]; return (