1import{u as x,r as i,j as e,as as p}from"./index-BK_dRcWU.js";import{g as m}from"./formsStore-DarmGCT5.js";function b(){const{id:t}=x(),l=i.useMemo(()=>t?m(t):null,[t]),[s,o]=i.useState(!1);return l?s?e.jsx(n,{children:e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[e.jsx(p,{className:"h-10 w-10",style:{color:"#0F1F3D"}}),e.jsx("h1",{className:"text-[20px] font-semibold",style:{color:"#0F1F3D"},children:"Preview only"}),e.jsx("p",{className:"text-[13px]",style:{color:"#6B7280"},children:"This submission was not saved. Publish the form to start collecting responses."})]})}):e.jsxs(n,{children:[e.jsx("header",{className:"mb-5",children:e.jsx("h1",{className:"text-[22px] font-semibold tracking-tight",style:{color:"#0F1F3D"},children:l.name})}),e.jsxs("form",{onSubmit:a=>{a.preventDefault(),o(!0)},className:"flex flex-col gap-4",children:[l.fields.filter(a=>!a.hidden).map(a=>e.jsx(d,{field:a},a.id)),e.jsx("button",{type:"submit",className:"mt-2 inline-flex h-10 items-center justify-center rounded-[8px] px-4 text-[13px] font-semibold transition-opacity hover:opacity-90",style:{backgroundColor:"#E6E04B",color:"#0F1F3D"},children:"Submit"})]})]}):e.jsx(n,{children:e.jsx("p",{className:"text-center text-[14px]",style:{color:"#374151"},children:"Form not found."})})}function n({children:t}){return e.jsx("div",{className:"min-h-screen",style:{background:"linear-gradient(135deg, #F7F8FA 0%, #ECEFF6 100%)",fontFamily:"'Inter', system-ui, sans-serif"},children:e.jsx("div",{className:"mx-auto max-w-[560px] px-6 py-12",children:e.jsx("div",{className:"rounded-[12px] border bg-white px-6 py-6",style:{borderColor:"#E5E7EB",boxShadow:"0 1px 2px rgba(15,31,61,0.04), 0 8px 24px rgba(15,31,61,0.06)"},children:t})})})}function d({field:t}){const l=t.required,s=`field-${t.id}`,o=e.jsxs("label",{htmlFor:s,className:"mb-1.5 block text-[13px] font-medium",style:{color:"#0F1F3D"},children:[t.label,l&&e.jsx("span",{className:"ml-0.5",style:{color:"#B91C1C"},children:"*"})]}),a={border:"1px solid #D1D5DB",borderRadius:8,padding:"8px 10px",fontSize:13,color:"#0F1F3D",width:"100%",background:"#FFFFFF"};return t.type==="section_heading"?e.jsx("h2",{className:"mt-2 text-[15px] font-semibold",style:{color:"#0F1F3D"},children:t.label}):t.type==="checkbox"?e.jsxs("label",{className:"flex items-center gap-2 text-[13px]",style:{color:"#0F1F3D"},children:[e.jsx("input",{id:s,name:s,type:"checkbox",required:l}),e.jsxs("span",{children:[t.label,l&&e.jsx("span",{className:"ml-0.5",style:{color:"#B91C1C"},children:"*"})]})]}):e.jsxs("div",{children:[o,t.type==="long_text"?e.jsx("textarea",{id:s,name:s,required:l,rows:4,placeholder:t.placeholder,defaultValue:t.defaultValue,style:a}):t.type==="select"?e.jsxs("select",{id:s,name:s,required:l,style:a,defaultValue:t.defaultValue??"",children:[e.jsx("option",{value:"",children:"Selectâ¦"}),(t.options??[]).map(r=>e.jsx("option",{value:r,children:r},r))]}):t.type==="multi_select"?e.jsx("div",{className:"flex flex-col gap-1",children:(t.options??[]).map(r=>{const c=`${s}-${r.replace(/\s+/g,"-").toLowerCase()}`;return e.jsxs("label",{htmlFor:c,className:"flex items-center gap-2 text-[13px]",style:{color:"#0F1F3D"},children:[e.jsx("input",{id:c,name:s,type:"checkbox",value:r}),r]},r)})}):e.jsx("input",{id:s,name:s,required:l,type:t.type==="email"?"email":t.type==="phone"?"tel":t.type==="number"?"number":t.type==="date"?"date":"text",placeholder:t.placeholder,defaultValue:t.defaultValue,style:a}),t.helpText&&e.jsx("p",{className:"mt-1 text-[11px]",style:{color:"#6B7280"},children:t.helpText})]})}export{b 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.