(()=>{var e={};e.id=8592,e.ids=[8592],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},91422:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>i.a,__next_app__:()=>p,originalPathname:()=>c,pages:()=>u,routeModule:()=>h,tree:()=>d}),r(89371),r(88242),r(35866);var s=r(23191),a=r(88716),n=r(37922),i=r.n(n),o=r(95231),l={};for(let e in o)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>o[e]);r.d(t,l);let d=["",{children:["signup",{children:["customer",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,89371)),"/root/ShiftedOffRoad/app/signup/customer/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,88242)),"/root/ShiftedOffRoad/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,35866,23)),"next/dist/client/components/not-found-error"]}],u=["/root/ShiftedOffRoad/app/signup/customer/page.tsx"],c="/signup/customer/page",p={require:r,loadChunk:()=>Promise.resolve()},h=new s.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/signup/customer/page",pathname:"/signup/customer",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},62049:(e,t,r)=>{Promise.resolve().then(r.bind(r,99339))},99369:(e,t,r)=>{Promise.resolve().then(r.bind(r,6844))},90486:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,12994,23)),Promise.resolve().then(r.t.bind(r,96114,23)),Promise.resolve().then(r.t.bind(r,9727,23)),Promise.resolve().then(r.t.bind(r,79671,23)),Promise.resolve().then(r.t.bind(r,41868,23)),Promise.resolve().then(r.t.bind(r,84759,23))},99339:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var s=r(10326),a=r(17577),n=r(77109);function i(){let[e,t]=(0,a.useState)(""),[r,i]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),[d,u]=(0,a.useState)(""),[c,p]=(0,a.useState)(!1);async function h(t){t.preventDefault(),p(!0),u("");try{let t=await fetch("/api/auth/signup-customer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,email:r,password:o})}),s=await t.json();if(!t.ok)throw Error(s.error||"Sign up failed");await (0,n.signIn)("credentials",{email:r,password:o,redirect:!0,callbackUrl:"/cart"})}catch(e){u(e.message||"Sign up failed.")}finally{p(!1)}}return s.jsx("main",{className:"auth-page",children:s.jsx("section",{className:"section",children:(0,s.jsxs)("div",{className:"container auth-page__inner",children:[s.jsx("h1",{className:"page-title",children:"Create Customer Account"}),(0,s.jsxs)("form",{className:"auth-card",onSubmit:h,children:[s.jsx("input",{type:"text",placeholder:"Name",value:e,onChange:e=>t(e.target.value)}),s.jsx("input",{type:"email",placeholder:"Email",value:r,onChange:e=>i(e.target.value)}),s.jsx("input",{type:"password",placeholder:"Password",value:o,onChange:e=>l(e.target.value)}),s.jsx("button",{className:"btn",type:"submit",disabled:c,children:c?"Creating...":"Create account"}),d?s.jsx("div",{className:"connect-message",children:d}):null]}),(0,s.jsxs)("div",{className:"connect-muted",children:["Already have an account? ",s.jsx("a",{href:"/login",children:"Sign in"})]})]})})})}},6844:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var s=r(10326),a=r(77109);function n({children:e}){return s.jsx(a.SessionProvider,{children:e})}},88242:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i,metadata:()=>n});var s=r(19510);r(7633);let a=(0,r(68570).createProxy)(String.raw`/root/ShiftedOffRoad/components/Providers.tsx#default`),n={title:"ShiftedFDev",description:"Next.js app"};function i({children:e}){return s.jsx("html",{lang:"en",children:s.jsx("body",{children:s.jsx(a,{children:e})})})}},89371:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});let s=(0,r(68570).createProxy)(String.raw`/root/ShiftedOffRoad/app/signup/customer/page.tsx#default`)},7633:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[9276,1159],()=>r(91422));module.exports=s})();