turkmen-textile-front/dist/assets/contacts-q9NtjZib.js

2 lines
4.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{v as x,j as s,f as d,w as h,s as l,B as u,O as p,Q as g}from"./ui-library-DfsjY96d.js";import{a as f}from"./react-vendor-OnsDvTPE.js";import{z as a,t as j}from"./index-Cut7DAH_.js";import{b}from"./service-BOgBrkXn.js";import{u as N}from"./use-scroll-top-ByehxtTO.js";const v=a.object({name:a.string().min(2,"error"),email:a.string().email(),phone:a.string().min(8,"error"),company:a.string().min(2,"error"),msg:a.string().min(5,"error")}),C={name:"",email:"",phone:"",company:"",msg:""},w=({className:n})=>{const[c,o]=f.useState(!1),e=x({resolver:j(v),defaultValues:C});async function m(i){try{const t=await b(i);o(t)}catch(t){console.error("POST contact",t)}}const{errors:r}=e.formState;return s.jsx("div",{className:d("bg-primary rounded-[8px] py-8 px-6 ",n),children:s.jsx(h,{...e,children:s.jsxs("form",{onSubmit:e.handleSubmit(m),children:[s.jsx("h2",{className:"h2 !text-on_primary lg:mb-8 mb-6",children:"Связаться с нами"}),s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsx(l,{onPrimary:!0,name:"name",control:e.control,label:"Имя",error:r.name}),s.jsxs("div",{className:"flex flex-col lg:flex-row gap-6",children:[s.jsx(l,{onPrimary:!0,name:"email",control:e.control,label:"E-mail",error:r.email}),s.jsx(l,{onPrimary:!0,name:"phone",control:e.control,label:"Телефон",error:r.phone})]}),s.jsx(l,{onPrimary:!0,name:"company",control:e.control,label:"Название компании",error:r.name}),s.jsx(l,{onPrimary:!0,textArea:!0,name:"msg",label:"Сообщение",control:e.control,error:r.msg}),s.jsx(u,{disabled:e.formState.isSubmitting||c,className:"w-full h-12 overflow-hidden",variant:"secondary",children:c?"Форма отправлена":e.formState.isSubmitting?s.jsx(p,{className:"animate-spin text-white"}):"Отправить"})]})]})})})};function F(){return N(),s.jsxs("div",{className:"flex flex-col gap-20 pt-10 md:pt-20",children:[s.jsx(g,{children:s.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-20 lg:gap-6",children:[s.jsx(w,{}),s.jsxs("div",{className:"p-6 bg-bg_surface_container rounded-[8px]",children:[s.jsx("h2",{className:"h2 mb-10 xl:mb-8",children:"Контакты"}),s.jsxs("div",{className:"flex flex-col gap-20",children:[s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("img",{src:"/contacts/map.svg",alt:"address"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl mb-2",children:"Адрес офиса:"}),s.jsx("address",{className:"text-base normal not-italic",children:"744000, г. Ашхабад, просп. Битарап Туркменистан, 183"})]})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("img",{src:"/contacts/phone.svg",alt:"phone"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl mb-2",children:"Телефон:"}),s.jsx("h4",{className:"text-base normal",children:"+99371871812; 99363719588"})]})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("img",{src:"/contacts/fax.svg",alt:"fax"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl mb-2",children:"Факс:"}),s.jsx("h4",{className:"text-base normal",children:"+99312454111"})]})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("img",{src:"/contacts/email.svg",alt:"email"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl mb-2",children:"E-mail:"}),s.jsx("h4",{className:"text-base normal",children:"contact@turkmenexpo.com"})]})]})]})]})]})}),s.jsx("section",{className:"relative w-full h-[300px] sm:h-[350px] md:h-[400px] lg:h-[600px]",children:s.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d1443.0869986358682!2d58.35620779177324!3d37.921200202365405!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3f7001fd7afd2a95%3A0x9ce9dca95ea4b87e!2z0JDQstC40LDQutCw0YHRgdCwINCw0LLQuNCw0LrQvtC80L_QsNC90LjQuCDCq9CR0LXQu9Cw0LLQuNCwwrsg0LIg0KLRg9GA0LrQvNC10L3QuNGB0YLQsNC90LU!5e0!3m2!1sru!2sru!4v1738063695919!5m2!1sru!2sru",className:"absolute inset-0 w-full h-full ",style:{border:0},allowFullScreen:!0,loading:"lazy"})})]})}export{F as default};