import{v as c,j as e,$ as p}from"./app-BGey7YPf.js";import{u as x}from"./use-toast-DGElh_6W.js";import{A as u}from"./auth-layout-B0XB68nN.js";import{B as g}from"./button-D5r5edT8.js";import{I as o}from"./input-CGSIKYsG.js";import{L as l}from"./label-BbSRpehS.js";import"./theme-provider-NKMbg-kV.js";function h(){const{toast:t}=x(),{data:r,setData:i,post:n,processing:d,errors:a}=c({register:"",password:""}),m=s=>{s.preventDefault(),n(route("register"),{onSuccess:()=>{t({variant:"success",title:"Selamat Datang",description:"Anda berhasil register!"})}})};return e.jsxs(e.Fragment,{children:[e.jsx(p,{title:"Register"}),e.jsxs("form",{className:"flex flex-col gap-6",onSubmit:m,children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Register to your account"}),e.jsx("p",{className:"text-balance text-sm text-muted-foreground",children:"silahkan masukan email / username dan password untuk memulai sesi anda."})]}),e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"register",children:"Username / Email"}),e.jsx(o,{id:"register",type:"text",placeholder:"Masukan email / username anda",autoComplete:"off",value:r.register,onChange:s=>i("register",s.target.value)}),a.register&&e.jsx("span",{className:"text-xs text-rose-500",children:a.register})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Kata Sandi"}),e.jsx(o,{id:"password",type:"password",placeholder:"Masukan kata sandi anda",autoComplete:"off",value:r.password,onChange:s=>i("password",s.target.value)}),a.password&&e.jsx("span",{className:"text-xs text-rose-500",children:a.password})]}),e.jsx(g,{type:"submit",className:"w-full",disabled:d,children:"Register"})]})]})]})}h.layout=t=>e.jsx(u,{children:t});export{h as default};
