import{u as p,j as e,H as c,L as x}from"./app-DiaC3P1v.js";import{T as o,I as m}from"./TextInput-BJ9SkPiE.js";import{I as i}from"./InputLabel-DUsZ-o2C.js";import{P as j}from"./PrimaryButton-DJEekznG.js";import{G as w}from"./GuestLayout-BepO2evm.js";/* empty css            */import"./ApplicationLogo-Ak1o1kUA.js";function b(){const{data:a,setData:r,post:n,processing:l,errors:t,reset:d}=p({name:"",email:"",password:"",password_confirmation:""}),u=s=>{s.preventDefault(),n(route("register"),{onFinish:()=>d("password","password_confirmation")})};return e.jsxs(w,{children:[e.jsx(c,{title:"Register"}),e.jsxs("form",{onSubmit:u,children:[e.jsxs("div",{className:"mb-3",children:[e.jsx(i,{htmlFor:"name",value:"Name"}),e.jsx(o,{id:"name",name:"name",value:a.name,autoComplete:"name",isFocused:!0,onChange:s=>r("name",s.target.value),required:!0}),e.jsx(m,{message:t.name,className:"mt-2"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx(i,{htmlFor:"email",value:"Email"}),e.jsx(o,{id:"email",type:"email",name:"email",value:a.email,autoComplete:"username",onChange:s=>r("email",s.target.value),required:!0}),e.jsx(m,{message:t.email,className:"mt-2"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx(i,{htmlFor:"password",value:"Password"}),e.jsx(o,{id:"password",type:"password",name:"password",value:a.password,autoComplete:"new-password",onChange:s=>r("password",s.target.value),required:!0}),e.jsx(m,{message:t.password,className:"mt-2"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx(i,{htmlFor:"password_confirmation",value:"Confirm Password"}),e.jsx(o,{id:"password_confirmation",type:"password",name:"password_confirmation",value:a.password_confirmation,autoComplete:"new-password",onChange:s=>r("password_confirmation",s.target.value),required:!0}),e.jsx(m,{message:t.password_confirmation,className:"mt-2"})]}),e.jsxs("div",{className:"d-flex align-items-center justify-content-end mt-4",children:[e.jsx(x,{href:route("login"),className:"text-decoration-none text-secondary me-3",children:"Already registered?"}),e.jsx(j,{disabled:l,children:"Register"})]})]})]})}export{b as default};
