"use strict";(()=>{var e={};e.id=538,e.ids=[538],e.modules={53524:e=>{e.exports=require("@prisma/client")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},84770:e=>{e.exports=require("crypto")},89654:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>v,patchFetch:()=>j,requestAsyncStorage:()=>x,routeModule:()=>m,serverHooks:()=>h,staticGenerationAsyncStorage:()=>g});var a={};t.r(a),t.d(a,{POST:()=>l,dynamic:()=>c});var s=t(49303),n=t(88716),i=t(60670),o=t(87070),p=t(42023),u=t.n(p),d=t(72331);let c="force-dynamic";async function l(e){try{let{email:r,password:t,name:a}=await e.json();if(!r||!t)return o.NextResponse.json({error:"Email and password required"},{status:400});if(await d._.user.findUnique({where:{email:r}}))return o.NextResponse.json({error:"User already exists"},{status:400});let s=await u().hash(t,12),n=await d._.user.create({data:{email:r,password:s,name:a??r?.split("@")?.[0]??"Admin",role:"ADMIN"}});return o.NextResponse.json({id:n?.id,email:n?.email,name:n?.name})}catch(e){return console.error("Signup error:",e),o.NextResponse.json({error:"Failed to create account"},{status:500})}}let m=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/signup/route",pathname:"/api/signup",filename:"route",bundlePath:"app/api/signup/route"},resolvedPagePath:"/Users/jarolsanchez/Desktop/evotrucks/nextjs_space/app/api/signup/route.ts",nextConfigOutput:"",userland:a}),{requestAsyncStorage:x,staticGenerationAsyncStorage:g,serverHooks:h}=m,v="/api/signup/route";function j(){return(0,i.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:g})}},72331:(e,r,t)=>{t.d(r,{_:()=>s});var a=t(53524);let s=globalThis.prisma||new a.PrismaClient}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),a=r.X(0,[948,598,70],()=>t(89654));module.exports=a})();