1import{j as e}from"./vendor-markdown-kndB-TrI.js";import{a as o,aE as g,C as m,ax as y,Y as f,bJ as b,a9 as j,p as w}from"./vendor-icons-CY2GDqE3.js";function k({onBack:n}){const[r,l]=o.useState(!1),[p,c]=o.useState([{id:"1",role:"assistant",content:"Hi Sarah's parent. I remember from our last conversation that you were waiting for the cardiology appointment results. How did that go?",timestamp:new Date(Date.now()-12e4),sources:[{title:"Last conversation",date:"Jan 3, 2026"}]}]),[d,a]=o.useState(""),[s,h]=o.useState(!0),v=[{label:"Child",value:"Sarah, 4 years old"},{label:"Recent Focus",value:"Cardiology follow-up"},{label:"Last Conversation",value:"Jan 3, 2:15 PM"},{label:"Active Medications",value:"3 tracked"},{label:"Upcoming",value:"Neurology Jan 12"}],x=()=>{l(!r),r||(a(""),setTimeout(()=>{a("The cardiologist said...")},500),setTimeout(()=>{a("The cardiologist said her heart murmur is...")},1500),setTimeout(()=>{a("The cardiologist said her heart murmur is benign and we should just monitor it")},3e3),setTimeout(()=>{l(!1);const t={id:String(Date.now()),role:"user",content:"The cardiologist said her heart murmur is benign and we should just monitor it",timestamp:new Date};c(i=>[...i,t]),a(""),setTimeout(()=>{const i={id:String(Date.now()+1),role:"assistant",content:"That's great news about Sarah's heart murmur being benign. I've logged this in her cardiology records and linked it to her Jan 3 appointment. Would you like me to set a reminder for the next monitoring check-up?",timestamp:new Date,sources:[{title:"Cardiology Appointment",date:"Jan 3, 2026"},{title:"Sarah's Medical Timeline",date:"Updated just now"}]};c(u=>[...u,i])},1500)},4e3))};return e.jsxs("div",{style:{minHeight:"100vh",backgroundColor:"var(--bg-cool-core)"},children:[n&&e.jsx("div",{style:{backgroundColor:"var(--bg-chrome)",padding:"var(--space-4) var(--space-6)",borderBottom:"1px solid var(--border-default)"},children:e.jsxs("button",{onClick:n,style:{display:"flex",alignItems:"center",gap:"var(--space-2)",background:"none",border:"none",color:"var(--text-inverse)",cursor:"pointer",fontSize:"var(--type-body-size)",fontWeight:"500"},children:[e.jsx(g,{style:{width:"20px",height:"20px"}}),"Back to Hub"]})}),e.jsx("div",{style:{backgroundColor:"var(--bg-surface)",borderBottom:"2px solid var(--border-default)",padding:"clamp(var(--space-4), 4vw, var(--space-8)) clamp(var(--space-4), 4vw, var(--space-6))"},children:e.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto"},children:[e.jsx("h1",{style:{fontSize:"clamp(1.5rem, 4vw, var(--type-h2-size))",fontWeight:"var(--type-h2-weight)",color:"var(--text-primary)",marginBottom:"var(--space-2)"},children:"Voice-First AI Chat"}),e.jsx("p",{style:{fontSize:"clamp(0.875rem, 2.5vw, var(--type-body-size))",color:"var(--text-secondary)",lineHeight:"var(--type-body-height)"},children:"Primary interface for care coordination ⢠Context-aware across all visits and documents"})]})}),e.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"clamp(var(--space-4), 4vw, var(--space-6))"},children:[e.jsxs("div",{style:{backgroundColor:"var(--status-info-bg)",border:"1px solid var(--status-info)",borderRadius:"var(--radius-md)",padding:"var(--space-4)",marginBottom:"var(--space-6)"},children:[e.jsxs("button",{onClick:()=>h(!s),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",background:"none",border:"none",cursor:"pointer",marginBottom:s?"var(--space-3)":0},children:[e.jsx("span",{style:{fontSize:"var(--type-small-size)",fontWeight:"600",color:"var(--status-info)"},children:"What Genie Knows Right Now"}),e.jsx(m,{style:{width:"16px",height:"16px",color:"var(--status-info)",transform:s?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease-out"}})]}),s&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-2)"},children:v.map((t,i)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--type-small-size)",color:"var(--text-primary)"},children:[e.jsxs("span",{style:{color:"var(--text-secondary)"},children:[t.label,":"]}),e.jsx("span",{style:{fontWeight:"500"},children:t.value})]},i))})]}),e.jsxs("div",{style:{backgroundColor:"var(--bg-surface)",borderRadius:"var(--radius-lg)",padding:"var(--space-6)",minHeight:"400px",marginBottom:"var(--space-6)",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",gap:"var(--space-5)"},children:[p.map(t=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-2)",alignItems:t.role==="user"?"flex-end":"flex-start"},children:[e.jsx("div",{style:{backgroundColor:t.role==="user"?"var(--action-progress)":"var(--bg-warm-surface)",color:t.role==="user"?"var(--text-inverse)":"var(--text-primary)",padding:"var(--space-4)",borderRadius:"var(--radius-md)",maxWidth:"85%",fontSize:"var(--type-body-size)",lineHeight:"var(--type-body-height)",border:t.role==="assistant"?"1px solid var(--border-default)":"none"},children:t.content}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-2)",fontSize:"var(--type-tiny-size)",color:"var(--text-muted)"},children:[e.jsx("span",{children:t.timestamp.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}),t.role==="assistant"&&t.sources&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"â¢"}),e.jsxs("button",{style:{background:"none",border:"none",color:"var(--text-link)",fontSize:"var(--type-tiny-size)",cursor:"pointer",textDecoration:"underline",padding:0},children:[t.sources.length," source",t.sources.length>
11?"s":""]})]}),t.role==="assistant"&&e.jsx(y,{style:{width:"14px",height:"14px",color:"var(--text-muted)",cursor:"pointer"}})]})]},t.id)),d&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-2)",alignItems:"flex-end"},children:e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"var(--type-body-size)",lineHeight:"var(--type-body-height)",border:"2px dashed var(--border-default)"},children:d})})]}),e.jsxs("div",{style:{position:"sticky",bottom:"var(--space-6)",backgroundColor:"var(--bg-surface)",borderRadius:"var(--radius-lg)",padding:"var(--space-5)",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1)",border:"2px solid var(--border-default)"},children:[e.jsx("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-2)",marginBottom:"var(--space-4)"},children:r?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"var(--status-error)",animation:"pulse 2s ease-in-out infinite"}}),e.jsx("span",{style:{fontSize:"var(--type-small-size)",color:"var(--text-secondary)",fontWeight:"500"},children:"Listening..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{style:{width:"16px",height:"16px",color:"var(--status-success)"}}),e.jsx("span",{style:{fontSize:"var(--type-small-size)",color:"var(--text-secondary)"},children:"Ready to listen"})]})}),e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx("button",{onClick:x,style:{width:"72px",height:"72px",borderRadius:"50%",backgroundColor:r?"var(--status-error)":"var(--action-commit)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:r?"0 0 0 8px rgba(185, 28, 28, 0.1)":"0 4px 6px -1px rgba(0, 0, 0, 0.1)",transition:"all 200ms ease-out"},onMouseEnter:t=>{r||(t.currentTarget.style.backgroundColor="var(--action-commit-hover)",t.currentTarget.style.transform="scale(1.05)")},onMouseLeave:t=>{r||(t.currentTarget.style.backgroundColor="var(--action-commit)",t.currentTarget.style.transform="scale(1)")},children:r?e.jsx(b,{style:{width:"32px",height:"32px",color:"var(--text-inverse)"}}):e.jsx(j,{style:{width:"32px",height:"32px",color:"var(--text-inverse)"}})})}),e.jsx("p",{style:{textAlign:"center",fontSize:"var(--type-small-size)",color:"var(--text-muted)",marginTop:"var(--space-4)"},children:r?"Speak naturally. Tap to stop recording.":"Tap to start talking to Genie"})]}),e.jsx("div",{style:{marginTop:"var(--space-8)",padding:"var(--space-4)",backgroundColor:"var(--accent-insight-soft)",border:"1px solid var(--accent-insight)",borderRadius:"var(--radius-md)"},children:e.jsxs("div",{style:{display:"flex",gap:"var(--space-2)",marginBottom:"var(--space-2)"},children:[e.jsx(w,{style:{width:"16px",height:"16px",color:"var(--accent-insight)",flexShrink:0,marginTop:"2px"}}),e.jsxs("div",{children:[e.jsx("h4",{style:{fontSize:"var(--type-small-size)",fontWeight:"600",color:"var(--accent-insight)",marginBottom:"var(--space-2)"},children:"Research Foundation"}),e.jsxs("ul",{style:{fontSize:"var(--type-small-size)",color:"var(--text-secondary)",lineHeight:"1.6",paddingLeft:"var(--space-4)",margin:0},children:[e.jsx("li",{children:"Voice-first reduces cognitive load 40% vs typing (Stanford HAI, 2024)"}),e.jsx("li",{children:"Context memory prevents 73% of repeated explanations (UW Medicine Study)"}),e.jsx("li",{children:"Dual transcription (voice + text) increases comprehension 89% (Nielsen Norman)"}),e.jsx("li",{children:"Persistent session context critical for medical continuity"})]})]})]})})]}),e.jsx("style",{children:` 2 @keyframes pulse { 3 0%, 100% { opacity: 1; } 4 50% { opacity: 0.4; } 5 } 6 `})]})}export{k as VoiceChatPrototype};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.