1import{u as c,R as i,r as d,a as b,j as e,b as u}from"./main-Dd7mJSoa.js";const m=u("34a400ef155cae4517b50b99a6f1db6819e2090dea5a8bc25de22b442e6347a4"),l=b({method:"POST"}).handler(m);function h(){const n=c();let o=i.useLoaderData();const[t,r]=d.useState(""),s=d.useCallback(async()=>{o=await l({data:t}),r(""),n.invalidate()},[l,t]);return e.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gradient-to-br from-zinc-800 to-black p-4 text-white",style:{backgroundImage:"radial-gradient(50% 50% at 20% 60%, #23272a 0%, #18181b 50%, #000000 100%)"},children:e.jsxs("div",{className:"w-full max-w-2xl p-8 rounded-xl backdrop-blur-md bg-black/50 shadow-xl border-8 border-black/10",children:[e.jsx("h1",{className:"text-2xl mb-4",children:"Start Server Functions - Todo Example"}),e.jsx("ul",{className:"mb-4 space-y-2",children:o?.map(a=>e.jsx("li",{className:"bg-white/10 border border-white/20 rounded-lg p-3 backdrop-blur-sm shadow-md",children:e.jsx("span",{className:"text-lg text-white",children:a.name})},a.id))}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("input",{type:"text",value:t,onChange:a=>r(a.target.value),onKeyDown:a=>{a.key==="Enter"&&s()},placeholder:"Enter a new todo...",className:"w-full px-4 py-3 rounded-lg border border-white/20 bg-white/10 backdrop-blur-sm text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:border-transparent"}),e.jsx("button",{disabled:t.trim().length===0,onClick:s,className:"bg-blue-500 hover:bg-blue-600 disabled:bg-blue-500/50 disabled:cursor-not-allowed text-white font-bold py-3 px-4 rounded-lg transition-colors",children:"Add todo"})]})]})})}export{h as component};
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.