1import{r,j as e,k as S,A as j,at as x,h as v,m as w}from"./index-u0HMC9Vb.js";const m="'Pliant', sans-serif",E=["Design begins with understanding how you live.","Before we develop your design proposal, weâd like to learn a little more about your relationship with this space.","Weâve already discussed the practical aspects of your project. This conversation is different.","Rather than focusing on measurements or layouts, weâd love to understand your routines, experiences and aspirations for the space weâre creating together.","There are no right or wrong answers. Simply answer honestly and in as much detail as you feel comfortable.","Your responses will help guide our design decisions throughout the project."],c=[{title:"Your Daily Rhythm",paragraphs:["Imagine this space is exactly how you want it.","Walk us through a typical day here. From the moment you enter, what happens?"],field:"daily_rhythm"},{title:"What Matters Most",paragraphs:["If you could only keep three elements of this space, what would they be, and why?"],field:"what_matters_most"},{title:"A Space You Remember",paragraphs:["Tell us about a real space youâve genuinely loved spending time in.","What do you remember most vividly, and why has it stayed with you?"],field:"space_remembered"},{title:"What Your Space Says",paragraphs:["If someone experienced this space for the first time, what would you hope they feel, notice or understand?"],field:"what_space_says"},{title:"Looking Ahead",paragraphs:["Imagine weâve completed the project perfectly.","Six months later, what has changed in your daily life because of this space?"],field:"looking_ahead"},{title:"Anything Else?",paragraphs:["Is there anything about the way you live that we havenât asked about, but you think we should understand before designing this space?"],field:"anything_else"}],d={display:"inline-flex",alignItems:"center",gap:8,padding:"14px 28px",background:"#1A1A1A",border:"none",borderRadius:4,cursor:"pointer",fontSize:13,fontFamily:m,color:"#FFFFFF",fontWeight:500},A={display:"inline-flex",alignItems:"center",gap:8,padding:"14px 28px",background:"transparent",border:"1px solid #E5E5E5",borderRadius:4,cursor:"pointer",fontSize:13,fontFamily:m,color:"#666"},F={width:"100%",padding:"14px 16px",border:"1px solid #E5E5E5",borderRadius:4,fontSize:14,fontFamily:m,color:"#1A1A1A",background:"#FFFFFF",outline:"none"};function W(n){return[n.city,n.country].filter(Boolean).join(", ")||"â"}function I(){const[n,s]=r.useState(0),[a,z]=r.useState(""),[i,k]=r.useState(null),[h,C]=r.useState(!1),[f,T]=r.useState({}),[o,u]=r.useState(!1),[g,y]=r.useState("");r.useEffect(()=>{window.scrollTo(0,0)},[n]);const b=async()=>{if(a.trim()){u(!0),y("");try{const t=await w.functions.invoke("designConversation",{action:"lookup",art_file_number:a.trim()});k(t.data),s(1)}catch{y("ART File not found. Please check the number and try again.")}u(!1)}},R=async()=>{u(!0),y("");try{await w.functions.invoke("designConversation",{action:"submit",art_file_number:a.trim(),art_file_id:i==null?void 0:i.art_file_id,project_name:i==null?void 0:i.project_name,research_consent:h,...f}),s(10)}catch{y("Something went wrong. Please try again.")}u(!1)},l=n-4,_=l===c.length-1;return e.jsx("div",{style:{minHeight:"100vh",background:"#FAF9F7",fontFamily:m},children:e.jsxs("main",{style:{maxWidth:680,margin:"0 auto",padding:"48px 24px 80px"},children:[e.jsxs("div",{style:{textAlign:"center",marginBottom:56},children:[e.jsx("p",{style:{fontSize:10,fontWeight:500,letterSpacing:"0.18em",textTransform:"uppercase",color:"#9A9A9A",margin:"0 0 4px 0"},children:"TRESDA Institute"}),e.jsx("p",{style:{fontSize:13,color:"#666",margin:0},children:"ART 001 · Design Conversation"})]}),n===0&&e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:26,fontWeight:500,color:"#1A1A1A",letterSpacing:"-0.01em",margin:"0 0 12px 0"},children:"Welcome"}),e.jsx("p",{style:{fontSize:15,color:"#666",lineHeight:1.7,margin:"0 0 32px 0"},children:"Enter your ART File Number to begin your design conversation."}),e.jsx("input",{value:a,onChange:t=>z(t.target.value),onKeyDown:t=>t.key==="Enter"&&b(),placeholder:"ART-2026-0048",style:{...F,fontFamily:"monospace",fontSize:15,textAlign:"center",maxWidth:300,margin:"0 auto 24px",display:"block"}}),g&&e.jsx("p",{style:{fontSize:13,color:"#C44",textAlign:"center",margin:"0 0 16px 0"},children:g}),e.jsx("div",{style:{textAlign:"center"},children:e.jsxs("button",{onClick:b,disabled:o||!a.trim(),style:{...d,opacity:o||!a.trim()?.5:1,cursor:o||!a.trim()?"default":"pointer"},children:[o?e.jsx(S,{size:15,className:"animate-spin"}):null,o?"Looking up...":"Continue"]})})]}),n===1&&i&&e.jsxs("div",{children:[e.jsx("p",{style:{fontSize:10,fontWeight:500,letterSpacing:"0.12em",textTransform:"uppercase",color:"#9A9A9A",margin:"0 0 8px 0"},children:"Confirm Your Project"}),e.jsx("h1",{style:{fontSize:24,fontWeight:500,color:"#1A1A1A",letterSpacing:"-0.01em",margin:"0 0 4px 0"},children:i.project_name}),e.jsx("p",{style:{fontSize:14,fontFamily:"monospace",color:"#9A9A9A",margin:"0 0 32px 0"},children:i.art_file_number}),e.jsx("div",{style:{background:"#FFFFFF",border:"1px solid #EAE8E4",borderRadius:6,padding:"24px"},children:[["Project Type",i.project_type],["Space Type",(i.space_types||[]).join(", ")
1],["Location",W(i)],["Lead Designer",i.lead_designer]].map(([t,p])=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"10px 0",borderBottom:"1px solid #F5F3EF"},children:[e.jsx("span",{style:{fontSize:12,color:"#9A9A9A"},children:t}),e.jsx("span",{style:{fontSize:13,color:"#1A1A1A"},children:p||"â"})]},t))}),e.jsx("p",{style:{fontSize:14,color:"#666",lineHeight:1.7,margin:"24px 0 32px 0"},children:"Is this your project?"}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsxs("button",{onClick:()=>s(0),style:A,children:[e.jsx(j,{size:15})," No, go back"]}),e.jsxs("button",{onClick:()=>s(2),style:d,children:["Yes, this is my project ",e.jsx(x,{size:15})]})]})]}),n===2&&e.jsxs("div",{children:[e.jsx("p",{style:{fontSize:10,fontWeight:500,letterSpacing:"0.12em",textTransform:"uppercase",color:"#9A9A9A",margin:"0 0 24px 0"},children:"Introduction"}),E.map((t,p)=>e.jsx("p",{style:{fontSize:17,color:"#333",lineHeight:1.75,margin:"0 0 20px 0"},children:t},p)),e.jsx("div",{style:{marginTop:16},children:e.jsxs("button",{onClick:()=>s(3),style:d,children:["Begin Conversation ",e.jsx(x,{size:15})]})})]}),n===3&&e.jsxs("div",{children:[e.jsx("p",{style:{fontSize:10,fontWeight:500,letterSpacing:"0.12em",textTransform:"uppercase",color:"#9A9A9A",margin:"0 0 8px 0"},children:"Research Consent (Optional)"}),e.jsx("h1",{style:{fontSize:24,fontWeight:500,color:"#1A1A1A",letterSpacing:"-0.01em",margin:"0 0 24px 0"},children:"Before we begin"}),e.jsx("p",{style:{fontSize:15,color:"#333",lineHeight:1.75,margin:"0 0 16px 0"},children:"With your permission, anonymised insights from this conversation may contribute to TRESDA Institute's ongoing research into identity and spatial design."}),e.jsx("p",{style:{fontSize:15,color:"#333",lineHeight:1.75,margin:"0 0 32px 0"},children:"This is entirely optional. Your design conversation will proceed the same way whether or not you consent."}),e.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:12,padding:"20px",background:"#FFFFFF",border:`1px solid ${h?"#1A1A1A":"#EAE8E4"}`,borderRadius:6,cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:h,onChange:t=>C(t.target.checked),style:{marginTop:2,accentColor:"#1A1A1A",width:16,height:16}}),e.jsx("span",{style:{fontSize:14,color:"#1A1A1A",lineHeight:1.6},children:"Yes, I consent to anonymised insights from this conversation being used for research purposes."})]}),e.jsx("p",{style:{fontSize:12,color:"#9A9A9A",margin:"12px 0 32px 0"},children:"Participation is voluntary. Personal identifiers are never included in research outputs."}),e.jsxs("div",{style:{display:"flex",gap:12},children:[e.jsxs("button",{onClick:()=>s(2),style:A,children:[e.jsx(j,{size:15})," Back"]}),e.jsxs("button",{onClick:()=>s(4),style:d,children:[h?"Continue":"Continue without consent"," ",e.jsx(x,{size:15})]})]})]}),n>=4&&n<=9&&e.jsxs("div",{children:[e.jsxs("p",{style:{fontSize:11,color:"#BBBBBB",margin:"0 0 32px 0"},children:["Chapter ",l+1," of ",c.length]}),e.jsx("h1",{style:{fontSize:24,fontWeight:500,color:"#1A1A1A",letterSpacing:"-0.01em",margin:"0 0 24px 0"},children:c[l].title}),c[l].paragraphs.map((t,p)=>e.jsx("p",{style:{fontSize:17,color:"#333",lineHeight:1.75,margin:"0 0 20px 0"},children:t},p)),e.jsx("textarea",{value:f[c[l].field]||"",onChange:t=>T({...f,[c[l].field]:t.target.value}),placeholder:"Take your time...",style:{...F,minHeight:220,resize:"vertical",lineHeight:1.7,fontSize:15,padding:"16px"},autoFocus:!0}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:32},children:[e.jsxs("button",{onClick:()=>s(n-1),style:A,children:[e.jsx(j,{size:15})," Back"]}),_?e.jsxs("button",{onClick:R,disabled:o,style:{...d,opacity:o?.6:1},children:[o?e.jsx(S,{size:15,className:"animate-spin"}):e.jsx(v,{size:15}),o?"Submitting...":"Submit Responses"]}):e.jsxs("button",{onClick:()=>s(n+1),style:d,children:["Continue ",e.jsx(x,{size:15})]})]}),g&&e.jsx("p",{style:{fontSize:13,color:"#C44",marginTop:16},children:g})]}),n===10&&e.jsxs("div",{style:{textAlign:"center",paddingTop:40},children:[e.jsx("div",{style:{width:56,height:56,borderRadius:"50%",background:"#1A1A1A",margin:"0 auto 32px",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(v,{size:24,style:{color:"#FFFFFF"},strokeWidth:1.5})}),e.jsx("h1",{style:{fontSize:28,fontWeight:500,color:"#1A1A1A",letterSpacing:"-0.01em",margin:"0 0 24px 0"}
1,children:"Thank you."}),e.jsx("p",{style:{fontSize:16,color:"#333",lineHeight:1.75,margin:"0 0 20px 0"},children:"Your responses have been added to your ART File and will help guide the next stage of your project."}),e.jsx("p",{style:{fontSize:16,color:"#333",lineHeight:1.75,margin:"0 0 40px 0"},children:"We'll now review your conversation alongside your project brief, measurements and inspiration before developing your first design proposal."}),e.jsx("p",{style:{fontSize:11,color:"#BBBBBB",letterSpacing:"0.1em",textTransform:"uppercase"},children:"ART 001 · TRESDA Institute"})]})]})})}export{I as default};
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.