1import{r as n,m as L,l as p,j as e,S as R,n as N,k as F,t as B}from"./index-DnzkrJT-.js";const z="_contact_us_main_section_1407u_5",W="_contactUs_title_1407u_19",Y="_corporate_office_title_1407u_35",H="_data_section_1407u_47",G="_right_main_section_1407u_113",J="_form_section_1407u_125",K="_input_style_1407u_161",Q="_select_style_1407u_231",X="_sent_enquiry_1407u_239",Z="_resend_link_1407u_991",s={contact_us_main_section:z,contactUs_title:W,corporate_office_title:Y,data_section:H,right_main_section:G,form_section:J,input_style:K,select_style:Q,sent_enquiry:X,resend_link:Z};function re(){var x;const[a,v]=n.useState({name:"",email:"",phone:"",state:"",city:"",message:""}),[b,C]=n.useState([]),[S,$]=n.useState([]),[ee,l]=n.useState(!1);Object.values(a).some(t=>!t);const u=L(),T=(x=u==null?void 0:u.state)==null?void 0:x.invalidUrl,[te,se]=n.useState(!1),[O,d]=n.useState([]),[P,_]=n.useState([]),[r,E]=n.useState(""),[ae,ne]=n.useState(null),[h,k]=n.useState(""),[f,w]=n.useState(!1),[I,oe]=n.useState(!1),[q,y]=n.useState(!1),[ie,ce]=n.useState("");n.useEffect(()=>{p.get("/state/657fd4e5005488601c6143b6").then(t=>{var i,c,j;const o=(j=(c=(i=t==null?void 0:t.data)==null?void 0:i.data)==null?void 0:c.states)==null?void 0:j.sort((A,D)=>A.stateName.localeCompare(D.stateName));C(o)}).catch(t=>{console.error("Error fetching states:",t)})},[]),n.useEffect(()=>{a!=null&&a.state&&p.get(`/city/?stateId=${a.state}`).then(t=>{const o=t.data.data.cities.sort((i,c)=>i.cityName.localeCompare(c.cityName));$(o)}).catch(t=>{console.error("Error fetching cities:",t)})},[a.state]);const m=t=>{v({...a,[t.target.name]:t.target.value})},g=async t=>{if(t.preventDefault(),r.length!==10){d("Enter a valid 10-digit mobile number");return}try{l(!0),y(!1),typeof fbq<"u"&&(fbq("track","Lead",{step:"otp_request",phoneNumber:r,page:window.location.pathname}),console.log("Pixel Lead fired on button click â
")),await N.post("/user/send-otp",{phone:r}),w(!0),d(""),setTimeout(()=>{y(!0)},6e4)}catch(o){console.error("Error sending OTP:",o),d("Failed to send OTP. Try again.")}finally{l(!1)}},M=t=>{E(t.target.value.replace(/\D/g,""))},U=async t=>{var o;t.preventDefault();try{l(!0);const i=`${r}`,c=await N.post("/user/verify-otp",{phone:i,otp:h});console.log("OTP Verify Response:",c.data),console.log("OTP Verify Response:",c.data.staus),(o=c.data)!=null&&o.status?(_(""),V()):_("Invalid OTP. Try again.")}catch(i){console.error("Error verifying OTP:",i),_("Invalid OTP. Try again.")}finally{l(!1)}},V=async()=>{try{l(!0);const t=await p.post("/contact/contactUs",{name:a.name,email:a.email,mobileNumber:a.phone,message:a.message,cityId:a.city,urlParameters:T,ecommerceActivity:"Contact"}),i=`${window.location.pathname.replace(/\/$/,"")}/thankyou`;F("Thank you for your enquiry. We will reach out to you soon...",B.SUCCESS)}catch(t){console.error("Error submitting form:",t),d("Failed to submit form.")}finally{l(!1)}};return e.jsxs("div",{children:[e.jsx(R,{}),e.jsx("div",{className:"container",children:e.jsxs("div",{className:`row ${s.contact_us_main_section}`,children:[e.jsx("label",{className:` ${s.contactUs_title}`,children:" Contact Us "}),e.jsxs("div",{className:`col-lg-6 col-md-12 col-sm-12 col-12 ${s.left_main_section}`,children:[e.jsxs("label",{className:` ${s.corporate_office_title}`,children:[" ","Corporate Office"," "]}),e.jsxs("div",{className:`${s.corporate_office_section}`,children:[e.jsxs("div",{className:`${s.data_section}`,children:[e.jsx("img",{src:"/assets/images/icon_map.svg",alt:""}),e.jsx("p",{className:"mx-2 mx-md-3",children:"No. 7, Industrial Estate, Opp. to World Trade Center,Perungudi, Chennai - 600 096, Tamil Nadu, India"})]}),e.jsxs("div",{className:`${s.data_section}`,children:[e.jsx("img",{src:"/assets/images/contact-home-visit-icon.svg",alt:""}),e.jsxs("p",{className:"mx-2 mx-md-3",children:[" Home Visit -",e.jsx("a",{className:"text-decoration-none",href:"tel:+91 8939066655",children:e.jsxs("b",{children:[" +91 89390",e.jsx("span",{children:" "}),"66655"]})})]})]}),e.jsxs("div",{className:`${s.data_section}`,children:[e.jsx("img",{src:"/assets/images/24-7-contact.svg",alt:""}),e.jsxs("p",{className:"mx-2 mx-md-3",children:[" Customer Care -",e.jsx("a",{className:"text-decoration-none",href:"tel:+91 9700369700",children:e.jsxs("b",{children:[" +91 97003",e.jsx("span",{children:" "}),"69700"]})})]})]})]})]}),e.jsx("div",{className:`col-lg-6 col-md-12 col-sm-12 col-12 ${s.right_main_section}`,children:e.jsx("div",{className:`${s.form_section}`,children:e.jsxs("form",{children:[e.jsx("label",{children:"Send an Enquiry"}),e.jsx("input",{type:"text",placeholder:"Name",autoComplete:"off",className:`form-control ${s.input_style}`,name:"name",value:a.name,onChange:m}),e.jsx("input",{type:"email",placeholder:"Email",autoComplete:"off",className:`form-control ${s.input_style}`,name:"email",value:a.email,onChange:m}),e.jsx("input",{type:"tel",maxLength:"10",placeholder:"Phone",autoComplete:"off",className:`form-control ${s.input_style}`,name:"phone",value:r,onChange:M}),e.jsx("span",{style:{color:"red",position:"absolute",marginTop:"-20px",fontSize:"12px"},children:O}),e.jsxs("select",{className:`form-control ${s.input_style} ${s.select_style}`,name:"state",value:a.state,onChange:m,children:[e.jsx("option",{value:"",children:"Select State"}),b.map(t=>e.jsx("option",{value:t._id,children:t.stateName},t._id))]}),e.jsxs("select",{className:`form-control ${s.input_style} ${s.select_style}`,name:"city",value:a.city,onChange:m,children:[e.jsx("option",{value:"",children:"Select City"}),S.map(t=>e.jsx("option",{value:t._id,children:t.cityName},t._id))]}),e.jsx("textarea",{placeholder:"Message",rows:"1",autoComplete:"off",className:`form-control ${s.input_style}`,name:"message",value:a.message,onChange:m}),f&&!I&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",placeholder:"Enter OTP",value:h,onChange:t=>k(t.target.value),className:`form-control mb-3 ${s.input_style}`}),e.jsx("span",{style:{color:"red",position:"relative",marginBottom:"10px",fontSize:"12px",display:"inline-block"},children:P}),e.jsx("button",{onClick:U,className:`btn btn-primary mb-2 ${s.sent_enquiry} mt-1`,children:"Verify OTP & Submit"}),q&&e.jsx("button",{onClick:g,className:`mt-1 ${s.resend_link}`,children:"Resend OTP"})]}),!f&&e.jsx("button",{onClick:g,className:`btn btn-primary mb-2 ${s.sent_enquiry} mt-1`,children:"Book Your Test Now"})]})})})]})})]})}export{re as default};
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.