1import{j as s,r as m}from"./react-s6noa07L.js";import{P as R,g as l,N as T,Q as I,b as z,u as F,S as Q,s as w}from"./index-CK6lfr5g.js";import{u as q}from"./i18n-CzrDXj-t.js";import"./router-CwT0-KLY.js";const B=({onChange:t,onSelect:e,height:i,options:c,defaultValue:n,disabled:o,children:a})=>s.jsx(R,{onChange:t,onSelect:e,height:i,options:c,disabled:o,defaultValue:n,children:a}),O=l.div` 2 display: flex; 3 align-items: center; 4 justify-content: space-between; 5 margin: 30px 0 45px; 6 @media (max-width: 800px) { 7 flex-direction: column; 8 margin: 50px 0 45px; 9 gap: 20px; 10 } 11`,d=l.div` 12 width: 40%; 13 @media (max-width: 800px) { 14 width: 100%; 15 } 16`;d.Title=l.div` 17 color: var(--faq); 18 font-size: 32px; 19 font-style: normal; 20 font-weight: 700; 21 line-height: 130%; 22 @media (max-width: 800px) { 23 font-size: 25px; 24 } 25`;d.Desc=l.div` 26 color: #95a1bb; 27 font-size: 16px; 28 font-style: normal; 29 font-weight: 600; 30 line-height: 140%; 31 padding: 16px 0 29px; 32 @media (max-width: 800px) { 33 padding: 10px 0 18px; 34 font-size: 14px; 35 } 36`;d.Form=l.form` 37 display: flex; 38 flex-direction: column; 39 gap: 30px; 40 @media (max-width: 800px) { 41 gap: 10px; 42 } 43`;d.Div=l.div` 44 display: flex; 45 align-items: center; 46 gap: 20px; 47 @media (max-width: 800px) { 48 gap: 10px; 49 } 50`;const k=l.div` 51 width: 50%; 52 iframe { 53 border: none; 54 width: 100%; 55 height: 606px; 56 border-radius: 8px; 57 @media (max-width: 800px) { 58 height: 400px; 59 } 60 } 61 @media (max-width: 800px) { 62 width: 100%; 63 } 64`,H=l(T)` 65 padding: 16px 32px; 66 font-size: 14px; 67 border-radius: 4px; 68 width: 112px; 69 @media (max-width: 800px) { 70 padding: 10px 20px; 71 } 72`,y=l(I)``,u={_origin:"https://api.emailjs.com"},P=(t,e="https://api.emailjs.com")=>{u._userID=t,u._origin=e},_=(t,e,i)=>{if(!t)throw"The user ID is required. Visit https://dashboard.emailjs.com/admin/integration";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!i)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class D{constructor(e){this.status=e.status,this.text=e.responseText}}const S=(t,e,i={})=>new Promise((c,n)=>{const o=new XMLHttpRequest;o.addEventListener("load",({target:a})=>{const p=new D(a);p.status===200||p.text==="OK"?c(p):n(p)}),o.addEventListener("error",({target:a})=>{n(new D(a))}
72),o.open("POST",u._origin+t,!0),Object.keys(i).forEach(a=>{o.setRequestHeader(a,i[a])}),o.send(e)}),G=(t,e,i,c)=>{const n=c||u._userID;return _(n,t,e),S("/api/v1.0/email/send",JSON.stringify({lib_version:"3.2.0",user_id:n,service_id:t,template_id:e,template_params:i}),{"Content-type":"application/json"})},M=t=>{let e;if(typeof t=="string"?e=document.querySelector(t):e=t,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},Y=(t,e,i,c)=>{const n=c||u._userID,o=M(i);_(n,t,e);const a=new FormData(o);return a.append("lib_version","3.2.0"),a.append("service_id",t),a.append("template_id",e),a.append("user_id",n),S("/api/v1.0/email/send-form",a)},J={init:P,send:G,sendForm:Y},A=()=>{const{t,i18n:e}=q(),{setBreadcrumb:i}=z(),{api:c}=F();m.useEffect(()=>{window.scrollTo(0,0)},[e.language]);const[n,o]=m.useState([]),[a,p]=m.useState(null),[h,b]=m.useState(""),[f,j]=m.useState(""),[C,L]=m.useState("");m.useEffect(()=>{(async()=>{const x=await c.get(e.language==="uz"?"/employment/sitegetallemployment":`/employment/sitegetallemploymenttranslation?language_code=${e.language}`);x.status===200&&o(x.data.map(g=>({value:g.id,label:g.title})))})(),i([{name:t("contact.title"),path:"/contact"}])},[e.language]);const E=r=>{r.preventDefault();const x="service_p5a70av",g="template_5hx4gc8",N="66gZgilC97nTCdbyJ";w.loading({key:"msg",content:"Loading!"}),J.send(x,g,{name:h,email:f,message:JSON.stringify({name:h,email:f,employemnt:n?.find(v=>v.value===a)?.label,description:C})},N).then(v=>{w.success({key:"msg",content:"Email sent successfully!"}),b(""),j(""),L("")}).catch(v=>{w.error({key:"msg",content:"Xatolik!"})})};return s.jsxs("div",{children:[s.jsx(Q,{title:t("seo.contact.title"),description:t("seo.contact.description"),breadcrumbs:[{name:t("contact.title"),url:`/${e.language}/contact`}],schema:{"@context":"https://schema.org","@type":"ContactPage",name:t("contact.title"),url:`https://tstu.uz/${e.language}/contact`}}),s.jsx("div",{className:"root-container",children:s.jsx("div",{className:"root-wrapper",children:s.jsxs(O,{"data-aos":"fade-up",children:[s.jsxs(d,{children:[s.jsx(d.Title,{children:t("contact.title")}),s.jsx(d.Desc,{children:t("contact.desc")}),s.jsxs(d.Form,{onSubmit:E,children:[s.jsx(B,{height:46,options:n,defaultValue:"Bandligi",value:a,onChange:r=>p(r)}),s.jsxs(d.Div,{children:[s.jsx(y,{value:h,onChange:r=>b(r.target.value),placeholder:"Your name"}),s.jsx(y,{value:f,type:"email",onChange:r=>j(r.target.value),placeholder:"Email"})]}),s.jsx(y,{value:C,onChange:r=>L(r.target.value),placeholder:"Description (optional)"}),s.jsx(H,{type:"primary",children:t("contact.btn")})]})]}),s.jsx(k,{children:s.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d11993.81247292006!2d69.2820477!3d41.2772419!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x38ae8aac316ee659%3A0xc5be678c10cbba9b!2z0KLQsNGI0LrQtdC90YLRgdC60LjQuSDQk9C-0YHRg9C00LDRgNGB0YLQstC10L3QvdGL0Lkg0KLRgNCw0L3RgdC_0L7RgNGC0L3Ri9C5INCj0L3QuNCy0LXRgNGB0LjRgtC10YI!5e0!3m2!1sru!2s!4v1711655518141!5m2!1sru!2s",loading:"lazy"})})]})})})]})};export{A 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.