(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6149],{1274:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ContactPage/ContactPage",function(){return t(3434)}])},4819:function(e,a,t){"use strict";t.d(a,{O_:function(){return _},dr:function(){return l},ec:function(){return d}});var n=t(5893),s=t(7294),o=t(1709),r=s.createContext(),c=s.createContext();function i(e,a){switch(a.type){case"LOGIN_SUCCESS":case"SIGNUP_SUCCESS":return{...e,isAuthenticated:!0,variant:a.variant||"",userObj:a.payload};case"SIGN_OUT_SUCCESS":return{...e,isAuthenticated:!1,variant:a.variant||""};case"HANDLE_AB_TEST_VARIANT":return{...e,variant:a.variant||""};default:throw new Error("Unhandled action type: ".concat(a.type))}}function l(e){let{children:a}=e;var[t,l]=s.useReducer(i,{isAuthenticated:!!(0,o.ej)("user_id"),userId:!!localStorage.getItem("user_id"),variant:(0,o.ej)("variant"),userObj:JSON.parse(localStorage.getItem("registerResponse")||localStorage.getItem("loginResponse"))});return(0,n.jsx)(r.Provider,{value:t,children:(0,n.jsx)(c.Provider,{value:l,children:a})})}function d(){var e=s.useContext(r);if(void 0===e)throw new Error("useUserState must be used within a UserProvider");return e}function _(){var e=s.useContext(c);if(void 0===e)throw new Error("useUserDispatch must be used within a UserProvider");return e}},3434:function(e,a,t){"use strict";t.r(a);var n=t(5893),s=t(7294),o=t(5152),r=t.n(o),c=t(3134),i=t.n(c),l=t(3596),d=t.n(l),_=t(4819);const u=r()((()=>t.e(4938).then(t.bind(t,4938))),{loadableGenerated:{webpack:()=>[4938]},ssr:!0}),m=r()((()=>t.e(2512).then(t.bind(t,2512))),{loadableGenerated:{webpack:()=>[2512]},ssr:!0}),h=r()((()=>t.e(7033).then(t.bind(t,7033))),{loadableGenerated:{webpack:()=>[7033]},ssr:!1}),g=r()((()=>t.e(8494).then(t.bind(t,8494))),{loadableGenerated:{webpack:()=>[8494]},ssr:!1}),f=r()((()=>t.e(5149).then(t.bind(t,5149))),{loadableGenerated:{webpack:()=>[5149]},ssr:!1}),v=r()((()=>t.e(6967).then(t.bind(t,6967))),{loadableGenerated:{webpack:()=>[6967]},ssr:!1}),p=r()((()=>t.e(5518).then(t.bind(t,6751))),{loadableGenerated:{webpack:()=>[6751]},ssr:!1}),x=e=>{const a=s.useRef(null),[t,o]=(0,s.useState)({full_name:"",email:"",message:""}),[r,c]=(0,s.useState)(""),[l,x]=(0,s.useState)(""),[C,w]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1);(0,s.useEffect)((()=>{const e=e=>{e.target.style.animation=""};a.current.addEventListener("animationend",e);let t=new URL(window.location.href).searchParams,n="".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname);return t&&"location"===t.get("navigate")&&(j("showroomContainer",100),window.history.pushState({path:n},"",n)),()=>{a.current.removeEventListener("animationend",e)}}),[]);const j=(e,a)=>{setTimeout((()=>{const t=document.getElementById(e);t&&window.scrollTo({top:Math.round(t.getBoundingClientRect().top+document.documentElement.scrollTop-a),behavior:"smooth"})}),400)},N=async(e,a)=>{switch(a){case"name":var n,s;if(!t.full_name)return void c("Please enter your name");if(t.full_name.length<3||!/^[a-zA-Z'\s]+$/.test(t.full_name))return void c("Allowed alphabets & space - min 3 characters");null===(s=window)||void 0===s||null===(n=s.dataLayer)||void 0===n||n.push({event:"NameOnBlur",userName:"".concat(t.full_name)});break;case"email":if(!t.email)return void x("Please enter your email address");if(!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.email))return void x("Invalid Email Id");var o,r;null===(r=window)||void 0===r||null===(o=r.dataLayer)||void 0===o||o.push({event:"EmailOnBlur",userEmail:"".concat(t.email)});break;case"message":t.message?w(""):w("Please enter your message")}},P=[{icon:(0,n.jsx)(v,{}),heading:"Address",text:"2nd Floor, 27th Main Rd, above Puma store, 1st Sector,\nHSR Layout, Bengaluru, Karnataka 560102"},{icon:(0,n.jsx)(g,{}),heading:"Toll-free number",text:"1800 309 8789"},{icon:(0,n.jsx)(f,{}),heading:"Email",text:"care@doowup.co"}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{children:"@keyframes slideInFromBottom{from{opacity:0;transform:translate(-50%,100%)}to{opacity:1;transform:translate(-50%,0)}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}"}),(0,n.jsx)(_.dr,{children:(0,n.jsx)(m,{contactPage:!0,intend:"ContactUs"})}),(0,n.jsxs)("div",{className:d().contact_us,children:[(0,n.jsx)(u,{breadcrumb:e.breadcrumb}),(0,n.jsxs)("div",{className:d().container,children:[(0,n.jsxs)("div",{className:d().card,children:[(0,n.jsxs)("div",{className:d().contact_us_section,children:[(0,n.jsx)("h1",{className:d().heading,children:"Contact Us"}),(0,n.jsx)("div",{className:d().address,children:P.map(((e,a)=>(0,n.jsxs)("div",{className:d().contact_details,children:[e.icon,(0,n.jsxs)("div",{className:d().contact_info,children:[(0,n.jsx)("div",{className:d().contact_info_heading,children:e.heading}),(0,n.jsx)("span",{className:d().contact_info_text,children:e.text})]})]},a)))})]}),(0,n.jsxs)("div",{className:d().get_in_touch,children:[(0,n.jsx)("span",{className:d().get_in_touch_heading,children:"Get in Touch"}),(0,n.jsxs)("form",{className:d().get_in_touch_form,onSubmit:async e=>{if(e.preventDefault(),b&&y(!1),N(0,"name"),N(0,"email"),N(0,"message"),!t.full_name||!t.email||!t.message||l||r||C)return;e.target.lastChild.disabled=!0,e.target.lastChild.innerHTML='<img src="https://super.homelane.com/loading_dots.GIF" />';const n={fullname:t.full_name,email:t.email,message:t.message};try{const t=await fetch("".concat(i().API_URL,"collectDoowupCustomerQuery"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!t.ok)throw new Error(t.status);o({full_name:"",email:"",message:""}),y(!0),e.target.lastChild.disabled=!1,e.target.lastChild.innerHTML="Send",a.current.style.animation="slideInFromBottom 1s ease forwards, fadeOut 1s ease forwards 2s"}catch(t){return o({full_name:"",email:"",message:""}),y(!1),e.target.lastChild.disabled=!1,e.target.lastChild.innerHTML="Send",a.current.innerText="Something went wrong!",a.current.style.animation="slideInFromBottom 1s ease forwards, fadeOut 1s ease forwards 2s",void(a.current.style.background="#e71c24")}},children:[(0,n.jsxs)("div",{className:d().fields,children:[(0,n.jsx)("input",{className:d().form_control,type:"text",name:"full_name",placeholder:"Full Name",value:t.full_name,onBlur:e=>N(0,"name"),onChange:e=>{c(""),o((a=>({...a,full_name:e.target.value})))}}),r&&(0,n.jsx)("span",{className:d().error_message,children:r})]}),(0,n.jsxs)("div",{className:d().fields,children:[(0,n.jsx)("input",{className:d().form_control,type:"email",name:"email",placeholder:"E-mail",value:t.email,onBlur:e=>N(0,"email"),onChange:e=>{x(""),o((a=>({...a,email:e.target.value})))}}),l&&(0,n.jsx)("span",{className:d().error_message,children:l})]}),(0,n.jsxs)("div",{className:d().fields,children:[(0,n.jsx)("input",{className:d().form_control,type:"text",name:"message",placeholder:"Message",value:t.message,onBlur:e=>N(0,"message"),onChange:e=>{w(""),o((a=>({...a,message:e.target.value})))}}),C&&(0,n.jsx)("span",{className:d().error_message,children:C})]}),(0,n.jsx)("button",{type:"submit",className:d().send_button,children:"Send"})]}),b&&(0,n.jsx)("div",{className:d().thank_you_message,children:"Thank you for reaching out to us. Our team will get back to you shortly."}),(0,n.jsx)("div",{ref:a,className:d().success_message,children:"Email sent successfully!"})]})]}),(0,n.jsx)(p,{}),(0,n.jsx)("div",{className:d().social_icon,children:(0,n.jsx)(h,{})}),(0,n.jsx)("div",{children:(0,n.jsx)("p",{className:d().copyRights,children:"Copyright © Homevista Decor and Furnishings Private Limited. All rights reserved."})})]})]})]})};x.getInitialProps=async e=>{let{req:a}=e;return{breadcrumb:(null==a?void 0:a.query.breadcrumb)||[]}},a.default=x},3596:function(e){e.exports={contact_us:"ContactPage_contact_us__rShr2",container:"ContactPage_container__15y5e",card:"ContactPage_card__OSk7N",heading:"ContactPage_heading__KwEQU",contact_us_section:"ContactPage_contact_us_section__m0Dix",contact_us_description:"ContactPage_contact_us_description__SWggC",contact_details:"ContactPage_contact_details__xsIbo",contact_info:"ContactPage_contact_info__K_Yd1",contact_info_heading:"ContactPage_contact_info_heading__2d2XA",contact_info_text:"ContactPage_contact_info_text__nUuTL",address:"ContactPage_address___AVDz",get_in_touch:"ContactPage_get_in_touch__tuD7m",get_in_touch_heading:"ContactPage_get_in_touch_heading__BZdo8",get_in_touch_form:"ContactPage_get_in_touch_form___qi36",fields:"ContactPage_fields__cI2pY",form_control:"ContactPage_form_control__VhhNt",error_message:"ContactPage_error_message__CTVSs",success_message:"ContactPage_success_message__Ueve2",thank_you_message:"ContactPage_thank_you_message__Iq8jD",slideInFromBottom:"ContactPage_slideInFromBottom__BmSqp",fadeOut:"ContactPage_fadeOut__t7Bp_",send_button:"ContactPage_send_button__nYFA_",social_icon:"ContactPage_social_icon__2LcJ5",copyRights:"ContactPage_copyRights__7_Yt5"}}},function(e){e.O(0,[9774,2888,179],(function(){return a=1274,e(e.s=a);var a}));var a=e.O();_N_E=a}]);