import{b as g,j as e,L as w}from"./vendor-rThclpOQ.js";import{I as o}from"./input-error-Br4ngfdE.js";import{B as c}from"./button-ZcsoqUQn.js";import{I as t}from"./input-BeqyurrI.js";import{L as n}from"./label-CtY1vfZY.js";import v from"./Layout-DGTn6w-U.js";import b from"./Message-q73vhJHa.js";import N from"./StepNavigator-D5bJDuBg.js";import"./utils-8KAaAB9H.js";import"./index-DquVdLUg.js";const y=i=>{const{NAME:x,EMAIL:h,PASSWORD:l,flash:p}=i,{data:s,errors:a,post:u,setData:j}=g({name:x||"",email:h||"",password:l||"",password_confirmation:l||""}),r=m=>{const d=m.target;j({...s,[d.name]:d.value})},f=m=>{m.preventDefault(),u(route("install.store-step4"))};return e.jsxs("div",{children:[e.jsx(N,{step1:"fill",step2:"fill",step3:"fill",step4:"active"}),e.jsxs("form",{id:"dataForm",onSubmit:f,children:[e.jsx(b,{error:p.error,success:p.success}),e.jsxs("div",{className:"mb-6",children:[e.jsx(n,{children:"Name"}),e.jsx(t,{id:"name",type:"text",name:"name",value:s.name,onChange:r,placeholder:"Username"}),e.jsx(o,{message:a.name})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(n,{children:"Email"}),e.jsx(t,{id:"email",type:"email",name:"email",value:s.email,onChange:r,placeholder:"Email"}),e.jsx(o,{message:a.email})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(n,{children:"Password"}),e.jsx(t,{id:"password",type:"password",name:"password",value:s.password,onChange:r,placeholder:"Password"}),e.jsx(o,{message:a.password})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(n,{children:"Confirm Password"}),e.jsx(t,{id:"password_confirmation",type:"password",name:"password_confirmation",value:s.password_confirmation,onChange:r,placeholder:"Confirm Password"}),e.jsx(o,{message:a.password_confirmation})]}),e.jsxs("div",{className:"mt-12 flex items-center justify-end gap-4",children:[e.jsx(w,{href:route("install.show-step3"),children:e.jsx(c,{type:"button",variant:"outline",className:"border border-orange-500 !bg-transparent !text-orange-500 uppercase",children:"Previous Step"})}),e.jsx(c,{type:"submit",className:"bg-orange-500 px-6 py-3 text-white uppercase hover:bg-orange-600/90",children:"Next Step"})]})]})]})};y.layout=i=>e.jsx(v,{children:i});export{y as default};
