module.exports=[738783,(a,b,c)=>{"use strict";b.exports=a.r(342602).vendored["react-ssr"].ReactServerDOMTurbopackClient},402246,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(695245),e=a.i(159501),f=a.i(336570),g=a.i(596221);let h=(0,a.i(170106).default)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);var i=a.i(699570),j=a.i(591119),k=a.i(441921),l=a.i(866718),m=a.i(478793),n=a.i(238246),o=a.i(50944),p=a.i(83490);let q=f.z.object({name:f.z.string().min(2,"Name must be at least 2 characters."),email:f.z.string().email("Please enter a valid email address."),password:f.z.string().min(8,"Password must be at least 8 characters."),password_confirmation:f.z.string()}).refine(a=>a.password===a.password_confirmation,{message:"Passwords don't match",path:["password_confirmation"]});function r(){let{toast:a}=(0,m.useToast)(),f=(0,o.useRouter)(),[r,s]=(0,c.useState)(!1),t=(0,d.useForm)({resolver:(0,e.zodResolver)(q),defaultValues:{name:"",email:"",password:"",password_confirmation:""}}),u=async b=>{s(!0);try{await p.default.post("https://arcedea.losenviskas.com/laravel-backend/public/api/register",b),a({title:"Signup Successful!",description:"Your account has been created. Please log in."}),f.push("/login")}catch(c){console.error("Signup failed:",c);let b="An unknown error occurred.";p.default.isAxiosError(c)&&c.response&&(b=c.response.data.message||b),a({variant:"destructive",title:"Signup Failed",description:b})}finally{s(!1)}};return(0,b.jsxs)("div",{className:"flex min-h-screen items-center justify-center bg-muted/40 p-4",children:[(0,b.jsxs)(n.default,{href:"/",className:"absolute left-8 top-8 py-2 px-4 rounded-lg no-underline text-foreground bg-muted-foreground/10 flex items-center gap-2 text-sm",children:[(0,b.jsxs)("svg",{className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"m12 19-7-7 7-7"}),(0,b.jsx)("path",{d:"M19 12H5"})]}),"Back to Home"]}),(0,b.jsxs)(j.Card,{className:"w-full max-w-sm",children:[(0,b.jsxs)(j.CardHeader,{className:"text-center",children:[(0,b.jsx)("div",{className:"mx-auto bg-primary text-primary-foreground rounded-full w-16 h-16 flex items-center justify-center mb-4",children:(0,b.jsx)(h,{className:"w-8 h-8"})}),(0,b.jsx)(j.CardTitle,{className:"text-2xl",children:"Create an Account"}),(0,b.jsx)(j.CardDescription,{children:"Sign up to start booking your adventures."})]}),(0,b.jsxs)(j.CardContent,{children:[(0,b.jsx)(k.Form,{...t,children:(0,b.jsxs)("form",{onSubmit:t.handleSubmit(u),className:"space-y-4",children:[(0,b.jsx)(k.FormField,{control:t.control,name:"name",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Full Name"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{placeholder:"John Doe",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"email",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Email Address"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{placeholder:"you@example.com",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"password",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Password"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{type:"password",placeholder:"••••••••",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsx)(k.FormField,{control:t.control,name:"password_confirmation",render:({field:a})=>(0,b.jsxs)(k.FormItem,{children:[(0,b.jsx)(k.FormLabel,{children:"Confirm Password"}),(0,b.jsx)(k.FormControl,{children:(0,b.jsx)(l.Input,{type:"password",placeholder:"••••••••",...a})}),(0,b.jsx)(k.FormMessage,{})]})}),(0,b.jsxs)(i.Button,{type:"submit",disabled:r,className:"w-full",children:[r?(0,b.jsx)(g.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Create Account"]})]})}),(0,b.jsxs)("p",{className:"mt-4 text-center text-sm text-muted-foreground",children:["Already have an account?"," ",(0,b.jsx)(n.default,{href:"/login",className:"underline hover:text-primary",children:"Sign In"})]})]})]})]})}a.s(["default",()=>r],402246)}];

//# sourceMappingURL=_90d67f5a._.js.map