1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9558],{39558:(e,l,t)=>{t.d(l,{A:()=>b});var a=t(37876),n=t(71090),r=t(91040),s=t(84100),i=t(89099),o=t(14232),c=t(88992),m=t(27179),d=t(31777),u=t(39091);t(15833);var h=t(30173),p=t(81676),f=t(30665),x=t(33194),v=t(20625),g=t(32171),j=t(97947),N=t(95718);let b=(0,o.forwardRef)((e,l)=>{var t;let{onClose:b,emiCalulator:y,property:_,hideAutoComplete:w}=e,E=(0,d.wA)();(0,o.useEffect)(()=>{if(_){var e,l,t,a,n,r,s,i;E((0,v.Qh)({bannerCarousel:null==_||null==(t=_.banner_carousel)||null==(l=t[0])||null==(e=l.image)?void 0:e.url,mobilebBannerCarousel:null==_||null==(r=_.mobile_banner_carousel)||null==(n=r[0])||null==(a=n.image)?void 0:a.url,overviewImage:null==_||null==(s=_.overview_image)?void 0:s.url,walkthroughLink:null==_?void 0:_.walkthrough_link,brochureUrl:null==_||null==(i=_.brochure)?void 0:i.url}))}},[_,E]);let[C,S]=(0,o.useState)(!1),[k,R]=(0,o.useState)(!1),[F,I]=(0,o.useState)("IN"),[M,U]=(0,o.useState)("IN"),[O,A]=(0,o.useState)(!0),q=(0,j.Z)(),[T,B]=(0,o.useState)({name:"",phone:"",email:"",city:"",country:""}),L=(0,i.useRouter)();(0,o.useEffect)(()=>{U(e=>F)},[F]);let Y=s.PhoneNumberUtil.getInstance();u.Zg(u.Yj,"phone",function(e){return this.test("phone",e,function(l){let{path:t,createError:a}=this;return void 0==l||""==l||null==l?a({path:t,message:e||"Enter a valid phone number for ".concat(M)}):Y.isValidNumber(Y.parse(l,M))||a({path:t,message:e||"Enter a valid phone number for ".concat(M)})})});let V=u.Ik({phone:u.Yj().phone().min(11,"Enter A Valid Number"),email:u.Yj().email("Enter Valid Email").required({message:"Email is required"}),firstName:u.Yj().required({message:"Name is required"}),city:u.Yj().required({message:"City is required"})}),{control:P,formState:{errors:D},getValues:G,register:H,handleSubmit:Z}=(0,c.mN)({resolver:(0,n.t)(V)});(0,o.useEffect)(()=>{B(e=>({...e,country:F}))},[F]),(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&b(e)};return window.addEventListener("keyup",e),()=>window.removeEventListener("keyup",e)},[b]),(0,o.useEffect)(()=>{let e=document.querySelector(".schedule-content .countryCode");e&&e.remove();let l=document.querySelector(".schedule-content .PhoneInputCountry"),t=document.createElement("div");t.className="countryCode",t.innerHTML="".concat(g.A[M]?g.A[M]:"0"),(null==l?void 0:l.parentNode)&&(null==l||l.parentNode.insertBefore(t,l.nextSibling))},[M]),(0,N.o)();let Q=async e=>{S(!0);try{let e=(0,m.lq)(G().phone),l=h.F.find(l=>l.value===(null==e?void 0:e.country)),t=await r.A.post("/api/enquiry",{formData:{firstName:T.name.split(" ")[0],lastName:T.name.split(" ")[1],email:T.email,city:T.city,...G(),country:null==l?void 0:l.title,phone:null==e?void 0:e.nationalNumber,countryCode:"+"+(null==e?void 0:e.countryCallingCode),optIn:O?"Yes":"No",dateTime:"2015-07-07T11:11:11",getInTouch:!0,OrganicCampagnID:null==q?void 0:q.campid,websiteName:null==q?void 0:q.websiteName,property:{id:null==_?void 0:_.id,name:null==_?void 0:_.name,city:null==_?void 0:_.city.name,addCode:null==_?void 0:_.add_code,projCode:null==_?void 0:_.proj_code,url:location.href}}});200===t.status&&(S(!1),L.push(y?"/getintouchemi-success":"/getintouch-success"))}catch(e){S(!1)}};return(0,a.jsx)("div",{id:L.asPath.includes("residential")?"property-get-in-touch":"home-get-in-touch",className:"modal modal-get-in-touch flex items-center justify-center",children:(0,a.jsx)("div",{className:"modal-content schedule-content relative p-8",ref:l,children:C?(0,a.jsx)("div",{className:"loading-div w-full",children:(0,a.jsx)("div",{className:"text-success inline-block h-20 w-20 animate-spin rounded-full border-4 border-solid border-current border-green-500 border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,a.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"close",onClick:e=>{b(e)},children:(0,a.jsx)("img",{src:"/images/modal-close.png",alt:"close"})}),(0,a.jsxs)("h4",{className:"text-center font-display font-medium",children:["Get in touch ",y&&"for Best Offers"]}),(0,a.jsxs)("div",{className:"content-area mx-auto flex flex-col font-primary",children:[(0,a.jsx)("span",{className:"mt-2 block md:mt-4",children:"Fill in the following details and we will get back to you shortly."}),(0,a.jsxs)("form",{id:"FORM_SUBMIT__GET_IN_TOUCH_CARD_03",className:"flex flex-col",onSubmit:Z(Q),children:[(0,a.jsxs)("div",{className:"form-row name-row flex flex-wrap justify-between",children:[(0,a.jsxs)("label",{className:"placeholder-label mt-2 md:mt-9",htmlFor:"",children:[(0,a.jsx)("p",{children:"Name*"}),(0,a.jsx)("input",{id:"FORM_USER_NAME_01",name:"name",type:"text",autoComplete:w?"off":"given-name",...H("firstName")}
1)]}),(0,a.jsxs)("label",{className:"placeholder-label mt-2 md:mt-9",htmlFor:"",children:[(0,a.jsx)("p",{children:"Email*"}),(0,a.jsx)("input",{id:"FORM_USER_EMAIL_03",name:"email",type:"text",autoComplete:w?"off":"given-name",...H("email")})]})]}),(0,a.jsxs)("div",{className:"form-row flex flex-wrap justify-between",children:[(0,a.jsx)("div",{children:D.firstName&&(0,a.jsx)("p",{role:"alert",className:"text-red-500",children:D.firstName.message.message||D.firstName.message})}),(0,a.jsx)("div",{children:D.email&&(0,a.jsx)("p",{role:"alert",className:"text-red-500",children:D.email.message.message||D.email.message})})]}),(0,a.jsxs)("div",{className:"form-row flex flex-wrap justify-between",children:[(0,a.jsxs)("label",{className:"placeholder-label mt-2 md:mt-9",htmlFor:"",children:[(0,a.jsx)("p",{children:"Country*"}),(0,a.jsx)(p.A,{id:"FORM_USER_COUNTRY_04",open:k,onToggle:()=>R(!k),onChange:e=>{I(e)},selectedValue:h.F.find(e=>e.value===F)})]}),(0,a.jsxs)("label",{className:"placeholder-label mt-2 md:mt-9",htmlFor:"",children:[(0,a.jsx)("p",{children:"City*"}),(0,a.jsx)("input",{id:"FORM_USER_CITY_05",name:"city",type:"text",autoComplete:w?"off":"given-name",...H("city")}),D.city&&(0,a.jsx)("p",{role:"alert",className:"text-red-500",children:D.city.message.message||D.city.message})]})]}),(0,a.jsx)("div",{className:"form-row flex flex-wrap justify-between",children:(0,a.jsxs)("label",{className:"placeholder-label mt-2 md:mt-9",htmlFor:"",children:[(0,a.jsx)("p",{children:"Mobile* (Click flag to change country)"}),(0,a.jsx)(c.xI,{name:"phone",control:P,defaultValue:"",rules:{minLength:11},render:e=>{var l;let{field:t}=e;return(0,a.jsx)(x.A,{...t,value:t.value,errors:!!D.phone,country:M,onCountryChange:e=>{U(e)},isError:!!(null==(l=D.phone)?void 0:l.message),id:"FORM_USER_MOBILE_02"})}}),(null==D?void 0:D.phone)&&(0,a.jsx)("p",{role:"alert",className:"text-red-500",children:null==D||null==(t=D.phone)?void 0:t.message})]})}),(0,a.jsxs)("label",{htmlFor:"FORM_USER_SUBSCRIBE_06",className:"checkbox-default mt-4 flex md:mt-8",children:[(0,a.jsx)("input",{type:"checkbox",onChange:()=>A(!O),checked:!!O,className:"",name:"status",id:"FORM_USER_SUBSCRIBE_06"}),(0,a.jsx)("span",{className:"font-primary",children:"Yes, I would like to receive updates & promotions from Godrej Properties Limited."})]}),(0,a.jsx)(f.A,{className:"".concat(y?"gtm-project-emi-calculator":"gtm-home-header-get-in-touch"," btn btn-outline text-center "),children:"Submit"})]})]})]})})})})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.