%PDF- %PDF-
Direktori : /proc/self/root/var/www/html/.next/static/chunks/ |
Current File : //proc/self/root/var/www/html/.next/static/chunks/899-91401b3546df9987.js |
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[899],{2300:function(e,t,n){var i=n(7568),a=n(92),s=n(5893),l=n(7294),r=n(1664),o=n.n(r),c=n(5675),d=n.n(c),u=n(2175),m=n(4231),v=n(5935),h=n(8777),p=n(3308);t.Z=function(){var e,t,n,r,c,g,j,x,f=(0,p.b)(),y=f.contact,b=f.footer,w=(f.setIsColor,(0,l.useState)(!1)),_=w[0],N=w[1],k=(0,l.useState)(!1),E=k[0],S=k[1];(0,l.useEffect)((function(){window.scrollTo({top:0,left:0,behavior:"smooth"})}),[]);var T=(0,l.useState)(!1),C=T[0],D=T[1];return(0,s.jsxs)("div",{className:"mainContact",children:[(0,s.jsx)("div",{className:"newsBackground",children:(0,s.jsxs)("div",{className:"intro",children:[(0,s.jsx)("div",{className:"contactUsDiv",children:(0,s.jsx)("h4",{children:null===y||void 0===y?void 0:y.small_title})}),(0,s.jsx)("h2",{children:null===y||void 0===y?void 0:y.title}),(0,s.jsx)("h1",{children:(0,s.jsx)("a",{href:"tel:".concat(null===y||void 0===y?void 0:y.phone),children:null===y||void 0===y?void 0:y.phone})})]})}),(0,s.jsxs)("div",{className:"content",children:[(0,s.jsx)(u.J9,{validationSchema:(0,m.Ry)({Email:(0,m.Z_)().email().required("Email is required"),terms:(0,m.O7)().oneOf([!0],"You must accept the terms and conditions")}),initialValues:{First_name:"",Email:"",Message:"",terms:!1},onSubmit:function(){var e=(0,i.Z)((function(e,t){var n,i,s,l,r;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return n=t.resetForm,N(!1),S(!1),i=e.First_name,s=e.Email,l=e.Message,e.terms,r={First_name:i,Email:s,Message:l},[4,fetch("https://api.atvbuggy-dubrovnik.com/wp-json/api/v1/sendMail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then((function(e){return e.json()})).then((function(e){return e}))];case 1:return!0===a.sent().status?(n({values:""}),N(!0)):S(!0),[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),children:function(e){var t,n,i=e.isSubmitting,a=e.isValidating;return(0,s.jsx)(u.l0,{children:(0,s.jsxs)("div",{className:"form",children:[(0,s.jsx)("h3",{children:null===y||void 0===y?void 0:y.form_description}),(0,s.jsx)(u.gN,{type:"text",placeholder:"Enter your name",name:"First_name"}),(0,s.jsx)(u.gN,{type:"text",placeholder:"Enter your email address",name:"Email"}),(0,s.jsx)(u.Bc,{name:"Email",children:function(e){return(0,s.jsx)("div",{className:"error-msg",children:e})}}),(0,s.jsx)(u.gN,{type:"text",placeholder:"Enter your message here",name:"Message"}),(0,s.jsxs)("div",{className:"policy",children:[(0,s.jsxs)("div",{className:"conditions",children:[(0,s.jsx)(u.gN,{type:"checkbox",name:"terms"}),(0,s.jsxs)("label",{htmlFor:"terms",children:["I have read and accepted the"," ",(0,s.jsx)(o(),{href:"/terms-and-conditions",children:"Terms and Conditions"})," ","and ",(0,s.jsx)(o(),{href:"/privacy-policy",children:"Privacy Policy"}),"."]})]}),(0,s.jsx)(u.Bc,{name:"terms",children:function(e){return(0,s.jsx)("div",{className:"error-msg",children:e})}}),_?(0,s.jsx)("p",{className:"success-msg",children:"Thank you for contacting us!"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"submit",disabled:i||a,className:"disabled-btn",children:[(0,s.jsx)("div",{className:"arrowsDiv",children:(0,s.jsx)(h.sN,{})}),"Submit Your Message"]}),E&&(0,s.jsx)("p",{className:"error-msg",children:"Something went wrong, please try again"})]}),(0,s.jsxs)("p",{className:"email-text",children:["Or send us and email to:"," ",(0,s.jsx)("a",{href:"mailto:"+(null===b||void 0===b||null===(t=b.socials)||void 0===t?void 0:t.email),children:"".concat(null===b||void 0===b||null===(n=b.socials)||void 0===n?void 0:n.email)})]})]})]})})}}),(0,s.jsx)("div",{className:"newsletter",children:(0,s.jsx)(o(),{href:(null===y||void 0===y?void 0:y.location_url)?null===y||void 0===y?void 0:y.location_url:"/",passHref:!0,children:(0,s.jsxs)("a",{target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)("span",{className:"newsletterLink",children:"Click on the image for Google maps location."}),(null===y||void 0===y?void 0:y.location_image)?(0,s.jsx)(d(),{src:"".concat(null===y||void 0===y?void 0:y.location_image),width:736,height:770,objectFit:"cover",objectPosition:"right"}):""]})})})]}),(0,s.jsxs)("div",{className:"footer",children:[(0,s.jsxs)("a",{href:"https://digitalpresent.io/",target:"_blank",rel:"noopener noreferrer","aria-label":"developed by Digital Present",className:"developed",children:[(0,s.jsx)("p",{className:"developed__p",children:"Developed by"}),(0,s.jsx)(h.V7,{color:"#fff"})]}),(0,s.jsxs)("p",{children:["Copyright ",(new Date).getFullYear()," ATV. All rights reserved."]}),null===b||void 0===b||null===(e=b.footer)||void 0===e?void 0:e.slice(0,1).map((function(e,t){return(0,s.jsxs)("div",{className:"legal",children:[(0,s.jsx)("p",{onClick:function(){D(!0),document.querySelector("html").classList.add("overflowHidden")},children:null===e||void 0===e?void 0:e.title}),(0,s.jsx)("div",{className:"legal-modal",style:{display:C?"flex":"none"},children:(0,s.jsxs)("div",{className:"legal-modal-content",children:[(0,s.jsx)("button",{onClick:function(e){D(!1),document.querySelector("html").classList.remove("overflowHidden")},children:(0,s.jsx)(h.Tw,{})}),(0,s.jsx)("p",{children:(0,v.ZP)(null===b||void 0===b?void 0:b.legal)})]})})]},t)})),null===b||void 0===b||null===(t=b.footer)||void 0===t?void 0:t.slice(1).map((function(e,t){return(0,s.jsx)("div",{className:"terms",children:(0,s.jsx)(o(),{href:"/".concat(e.slug),children:(0,s.jsx)("p",{children:e.title})})},t)})),(0,s.jsxs)("div",{className:"icons",children:["".concat(null===b||void 0===b||null===(n=b.socials)||void 0===n?void 0:n.tw)?(0,s.jsx)("a",{href:"".concat(null===b||void 0===b||null===(r=b.socials)||void 0===r?void 0:r.tw),target:"_blank",rel:"noreferrer",children:(0,s.jsx)(h.Zm,{})}):"","".concat(null===b||void 0===b||null===(c=b.socials)||void 0===c?void 0:c.in)?(0,s.jsx)("a",{href:"".concat(null===b||void 0===b||null===(g=b.socials)||void 0===g?void 0:g.in),target:"_blank",rel:"noreferrer",children:(0,s.jsx)(h.kd,{})}):"","".concat(null===b||void 0===b||null===(j=b.socials)||void 0===j?void 0:j.fb)?(0,s.jsx)("a",{href:"".concat(null===b||void 0===b||null===(x=b.socials)||void 0===x?void 0:x.fb),target:"_blank",rel:"noreferrer",children:(0,s.jsx)(h.BM,{})}):""]})]})]})}},787:function(e,t,n){var i=n(5893),a=n(9008),s=n.n(a);t.Z=function(e){var t,n,a;return(0,i.jsxs)(s(),{children:[(0,i.jsx)("link",{rel:"canonical",href:e.data.og_url.replace("api.","")}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, user-scalable=0"}),(0,i.jsx)("title",{children:e.data.title}),(0,i.jsx)("meta",{name:"title",content:e.data.title}),(0,i.jsx)("meta",{name:"description",content:null!==(t=e.data.description)&&void 0!==t?t:"ATV Dubrovnik"}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{property:"og:url",content:e.data.og_url.replace("api.","")}),(0,i.jsx)("meta",{property:"og:title",content:e.data.title}),(0,i.jsx)("meta",{property:"og:description",content:null!==(n=e.data.description)&&void 0!==n?n:"ATV Dubrovnik"}),(0,i.jsx)("meta",{property:"og:image",content:e.data.og_image?e.data.og_image.url:"https://api.atvbuggy-dubrovnik.com/wp-content/uploads/2022/08/atv_dubrovnik.png"}),(0,i.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,i.jsx)("meta",{property:"twitter:url",content:e.data.og_url.replace("api.","")}),(0,i.jsx)("meta",{property:"twitter:title",content:e.data.title}),(0,i.jsx)("meta",{property:"twitter:description",content:null!==(a=e.data.description)&&void 0!==a?a:"ATV Dubrovnik"}),(0,i.jsx)("meta",{property:"twitter:image",content:e.data.og_image?e.data.og_image.url:"https://api.atvbuggy-dubrovnik.com/wp-content/uploads/2022/08/atv_dubrovnik.png"}),(0,i.jsx)("script",{src:"https://www.googletagmanager.com/gtag/js?id=G-YP99VQ2N62"}),(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:"window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', 'G-YP99VQ2N62');"}})]})}}}]);