(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{7572:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register",function(){return n(7462)}])},7462:function(e,l,n){"use strict";n.r(l),n.d(l,{__N_SSP:function(){return f}});var t=n(3288),a=n(1980),r=n(2466),o=n(5341),i=n(8795),s=n(1635),u=n(9851),c=n(8082),d=n(7566),p=n(1395),x=n(2493),m=n.n(x),g=n(2749);let h=()=>{let e=(0,i.I0)(),l=(0,p.useRouter)(),{registerFormInfo:n,userGeoLocation:x}=(0,i.v9)(e=>e.auth),{t:g,lang:h}=(0,c.Z)("common");return(0,r.useEffect)(()=>()=>{e((0,u.g)({}))},[e]),(0,t.jsxs)("div",{className:"min-h-screen flex -mt-[75px] flex-col items-center justify-center custom-container ",children:[(0,t.jsx)("div",{className:"mt-10 pb-4",children:(0,t.jsx)(m(),{className:"cursor-pointer",onClick(){window.location.href="https://carstudio.ai"},alt:"carstudio-logo-turuncu",src:"/images/carstudio-logo-turuncu.png",priority:!0,width:180,height:40})}),(0,t.jsxs)("div",{className:"mb-10 bg-accent-light-gray-100 sm:w-[443px] rounded-[30px] px-[32px] lg:px-[50px] pb-[34px] relative",children:[(0,t.jsx)("h2",{className:"pt-[20px] mb-[20px] text-secondary-800 font-semibold text-center text-[22px]",children:g("signUp")}),(0,t.jsxs)("div",{className:"flex flex-col gap-[22px]",children:[(0,t.jsx)(o.iy,{value:n.fullName,Icon:a.Tk,label:g("fullName"),placeHolder:g("writeYourNameAndSurname"),onChange:l=>e((0,u.g)({...n,fullName:l.target.value}))}),(0,t.jsx)(o.iy,{Icon:a.LQ,label:g("email"),placeHolder:g("writeYourEmail"),value:n.email,onChange:l=>e((0,u.g)({...n,email:l.target.value}))}),(0,t.jsx)(o.iy,{defaultCountry:null==x?void 0:x.country_code,value:n.phone,type:"phone",Icon:a.qW,label:g("phone"),onChange:l=>e((0,u.g)({...n,phone:l}))}),(0,t.jsx)(o.iy,{value:n.refCode,Icon:a.hJ,label:g("referenceCode"),placeHolder:g("enterReferenceCode"),labelDesc:g("notRequired"),onChange(l){e((0,u.g)({...n,refCode:l.target.value}))}}),(0,t.jsx)("p",{dangerouslySetInnerHTML:{__html:g("bySigningUpOr")},className:" text-[12px] text-center"}),(0,t.jsx)("button",{async onClick(){var l,t,a,r;if((0,d.N_)(),(null===(l=n.phone)||void 0===l?void 0:l.length)<10){e((0,s.mb)({show:!0,type:"error",customMessage:g("pleaseEnterPhoneNumber")}));return}let o=null===(t=null==n?void 0:null===(a=n.fullName)||void 0===a?void 0:a.split(" "))||void 0===t?void 0:t.filter(e=>""!==e),i=null==o?void 0:o[0],c=null==o?void 0:o[1];if(!i||!c){e((0,s.mb)({show:!0,type:"error",customMessage:g("pleaseEnterFullName")}));return}let p=o[o.length-1];"registerSendEmail/fulfilled"===(await e((0,u.rZ)({email:n.email,firstname:null===(r=null==o?void 0:o.filter(e=>e!==p))||void 0===r?void 0:r.join(" "),lastname:p,phoneNumber:n.phone,country:(null==x?void 0:x.country)||"LOCATION_ERROR",language:null==h?void 0:h.toUpperCase(),registerMethod:"EMAIL",refCode:n.refCode||""}))).type&&e((0,s.QT)(!0))},className:"bg-mainOrange text-[#FAFAFB] active:bg-[#F18616] transition-all px-[49px] py-[11px] rounded-[16px] text-[12px] w-full font-extrabold tracking-[0.08em] pointer-events-auto",children:g("signUp")}),(0,t.jsx)("div",{className:"my-[6px] h-[1px] w-[120px] bg-mainOrange rounded-full mx-auto"}),(0,t.jsxs)("div",{className:"-mt-[2px] flex items-center justify-center gap-[16px]",children:[(0,t.jsx)("p",{className:"text-[#FFFFF] text-[14px] ",children:g("alreadyHaveAnAccount")}),(0,t.jsx)("button",{onClick(){l.push("/login")},className:"text-mainOrange text-[12px] font-semibold",children:g("login")})]})]})]})]})};h.layout=g.Ar;var f=!0;l.default=h}},function(e){e.O(0,[7264,2749,9774,2888,179],function(){return e(e.s=7572)}),_N_E=e.O()}]);