import{u as m,j as e,H as u}from"./app-BQEFzdw6.js";import{A as c}from"./AppLayout-kozc03ce.js";import{P as d}from"./PageHeader-Bj1OQnqr.js";import{F as l}from"./FormField-HY4WrCzQ.js";import"./useThemeColor-qPCpc713.js";function f(){const{data:s,setData:r,post:i,processing:n,errors:t}=m({name:"",phone:"",email:"",address:"",city:"",notes:""});function o(a){a.preventDefault(),i(route("clients.store"))}return e.jsxs(c,{children:[e.jsx(u,{title:"New Client"}),e.jsx(d,{title:"New Client",back:route("clients.index")}),e.jsx("div",{className:"p-4 sm:p-6 max-w-2xl mx-auto",children:e.jsxs("form",{onSubmit:o,className:"card p-6 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(l,{label:"Full Name",error:t.name,required:!0,children:e.jsx("input",{className:"form-input",value:s.name,onChange:a=>r("name",a.target.value)})}),e.jsx(l,{label:"Phone",error:t.phone,required:!0,children:e.jsx("input",{className:"form-input",value:s.phone,onChange:a=>r("phone",a.target.value)})}),e.jsx(l,{label:"Email",error:t.email,children:e.jsx("input",{type:"email",className:"form-input",value:s.email,onChange:a=>r("email",a.target.value)})}),e.jsx(l,{label:"City",error:t.city,children:e.jsx("input",{className:"form-input",value:s.city,onChange:a=>r("city",a.target.value)})})]}),e.jsx(l,{label:"Address",error:t.address,children:e.jsx("textarea",{className:"form-input",rows:2,value:s.address,onChange:a=>r("address",a.target.value)})}),e.jsx(l,{label:"Notes",error:t.notes,children:e.jsx("textarea",{className:"form-input",rows:3,value:s.notes,onChange:a=>r("notes",a.target.value)})}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"submit",disabled:n,className:"btn btn-primary",children:n?"Saving…":"Save Client"}),e.jsx("a",{href:route("clients.index"),className:"btn",children:"Cancel"})]})]})})]})}export{f as default};
