(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let t=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},11123,e=>{"use strict";let{useGetContactUsQuery:t,useLazyGetContactUsQuery:r,useCreateContactUsMessageMutation:n,useUpdateContactUsMessageMutation:a,useDeleteContactUsMessageMutation:s}=e.i(37793).baseApi.injectEndpoints({endpoints:e=>({getContactUs:e.query({query:()=>"/contact-us",providesTags:e=>e?[...e.map(e=>({type:"ContactUs",id:e.id})),{type:"ContactUs",id:"LIST"}]:[{type:"ContactUs",id:"LIST"}]}),createContactUsMessage:e.mutation({query:e=>({url:"/contact-us",method:"POST",body:e}),invalidatesTags:[{type:"ContactUs",id:"LIST"}]}),updateContactUsMessage:e.mutation({query:({id:e,body:t})=>({url:`/contact-us/${e}`,method:"PUT",body:t}),invalidatesTags:(e,t,r)=>[{type:"ContactUs",id:r.id},{type:"ContactUs",id:"LIST"}]}),deleteContactUsMessage:e.mutation({query:e=>({url:`/contact-us/${e}`,method:"DELETE"}),invalidatesTags:(e,t,r)=>[{type:"ContactUs",id:r},{type:"ContactUs",id:"LIST"}]})}),overrideExisting:!1});e.s(["useCreateContactUsMessageMutation",0,n,"useDeleteContactUsMessageMutation",0,s,"useGetContactUsQuery",0,t,"useLazyGetContactUsQuery",0,r,"useUpdateContactUsMessageMutation",0,a])},50861,e=>{"use strict";var t=e.i(71645),r=e.i(43476),n=(0,t.forwardRef)(({as:e="div",...t},n)=>(0,r.jsx)(e,{...t,ref:n}));let a="onloadTurnstileCallback",s={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}},o="unloaded",i,l=new Promise((e,t)=>{i={resolve:e,reject:t},"ready"===o&&e(void 0)}),c=(e=a)=>("unloaded"===o&&(o="loading",window[e]=()=>{i.resolve(),o="ready",delete window[e]}),l),u=(0,t.forwardRef)((e,i)=>{let{scriptOptions:l,options:u={},siteKey:d,onWidgetLoad:m,onSuccess:p,onExpire:x,onError:f,onBeforeInteractive:h,onAfterInteractive:b,onUnsupported:v,onTimeout:g,onLoadScript:y,id:j,style:w,as:N="div",injectScript:k=!0,rerenderOnCallbackChange:C=!1,...T}=e,z=u.size,E=(0,t.useCallback)(()=>void 0===z?{}:"execute"===u.execution?s.invisible:"interaction-only"===u.appearance?s.interactionOnly:s[z],[u.execution,z,u.appearance]),[S,U]=(0,t.useState)(E()),I=(0,t.useRef)(null),[O,M]=(0,t.useState)(!1),B=(0,t.useRef)(void 0),F=(0,t.useRef)(!1),A=j||"cf-turnstile",L=(0,t.useRef)({onSuccess:p,onError:f,onExpire:x,onBeforeInteractive:h,onAfterInteractive:b,onUnsupported:v,onTimeout:g});(0,t.useEffect)(()=>{C||(L.current={onSuccess:p,onError:f,onExpire:x,onBeforeInteractive:h,onAfterInteractive:b,onUnsupported:v,onTimeout:g})});let R=l?.id||"cf-turnstile-script",P=function(e="cf-turnstile-script"){let[r,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let t=()=>{document.getElementById(e)&&n(!0)},r=new MutationObserver(t);return r.observe(document,{childList:!0,subtree:!0}),t(),()=>{r.disconnect()}},[e]),r}(R),D=l?.onLoadCallbackName||"onloadTurnstileCallback",Z=u.appearance||"always",$=(0,t.useMemo)(()=>({sitekey:d,action:u.action,cData:u.cData,theme:u.theme||"auto",language:u.language||"auto",tabindex:u.tabIndex,"response-field":u.responseField,"response-field-name":u.responseFieldName,size:function(e){if("invisible"!==e&&"interactionOnly"!==e)return e}(z),retry:u.retry||"auto","retry-interval":u.retryInterval||8e3,"refresh-expired":u.refreshExpired||"auto","refresh-timeout":u.refreshTimeout||"auto",execution:u.execution||"render",appearance:u.appearance||"always","feedback-enabled":u.feedbackEnabled??!0,callback:e=>{F.current=!0,C?p?.(e):L.current.onSuccess?.(e)},"error-callback":C?f:(...e)=>L.current.onError?.(...e),"expired-callback":C?x:(...e)=>L.current.onExpire?.(...e),"before-interactive-callback":C?h:(...e)=>L.current.onBeforeInteractive?.(...e),"after-interactive-callback":C?b:(...e)=>L.current.onAfterInteractive?.(...e),"unsupported-callback":C?v:(...e)=>L.current.onUnsupported?.(...e),"timeout-callback":C?g:(...e)=>L.current.onTimeout?.(...e)}),[u.action,u.appearance,u.cData,u.execution,u.language,u.refreshExpired,u.responseField,u.responseFieldName,u.retry,u.retryInterval,u.tabIndex,u.theme,u.feedbackEnabled,u.refreshTimeout,d,z,C,C?p:null,C?f:null,C?x:null,C?h:null,C?b:null,C?v:null,C?g:null]),q=(0,t.useCallback)(()=>"u">typeof window&&!!window.turnstile,[]);return(0,t.useEffect)(function(){k&&!O&&(c(D),(({render:e="explicit",onLoadCallbackName:t=a,scriptOptions:{nonce:r="",defer:n=!0,async:s=!0,id:o="",appendTo:i,onError:l,crossOrigin:c=""}={}})=>{let u=o||"cf-turnstile-script";if(document.getElementById(u))return;let d=document.createElement("script");d.id=u,d.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,document.querySelector(`script[src="${d.src}"]`)||(d.defer=!!n,d.async=!!s,r&&(d.nonce=r),c&&(d.crossOrigin=c),l&&(d.onerror=l,delete window[t]),("body"===i?document.body:document.getElementsByTagName("head")[0]).appendChild(d))})({onLoadCallbackName:D,scriptOptions:{...l,id:R}}))},[k,O,l,R,D]),(0,t.useEffect)(function(){"ready"!==o&&c(D).then(()=>M(!0)).catch(console.error)},[D]),(0,t.useEffect)(function(){if(!I.current||!O)return;let e=!1;return(async()=>{e||!I.current||(B.current=window.turnstile.render(I.current,$),B.current&&m?.(B.current))})(),()=>{e=!0,B.current&&(window.turnstile.remove(B.current),F.current=!1)}},[A,O,$]),(0,t.useImperativeHandle)(i,()=>{let{turnstile:e}=window;return{getResponse:()=>e?.getResponse&&B.current&&q()?e.getResponse(B.current):void console.warn("Turnstile has not been loaded"),getResponsePromise:async(e=3e4,t=100)=>new Promise((r,n)=>{let a,s=async()=>{if(F.current&&window.turnstile&&B.current)try{let e=window.turnstile.getResponse(B.current);return a&&clearTimeout(a),e?r(e):n(Error("No response received"))}catch(e){return a&&clearTimeout(a),console.warn("Failed to get response",e),n(Error("Failed to get response"))}a||=setTimeout(()=>{a&&clearTimeout(a),n(Error("Timeout"))},e),await new Promise(e=>setTimeout(e,t)),await s()};s()}),reset(){if(!e?.reset||!B.current||!q())return void console.warn("Turnstile has not been loaded");"execute"===u.execution&&U(s.invisible);try{F.current=!1,e.reset(B.current)}catch(e){console.warn(`Failed to reset Turnstile widget ${B.current}`,e)}},remove(){e?.remove&&B.current&&q()?(U(s.invisible),F.current=!1,e.remove(B.current),B.current=null):console.warn("Turnstile has not been loaded")},render(){if(!e?.render||!I.current||!q()||B.current)return void console.warn("Turnstile has not been loaded or container not found");let t=e.render(I.current,$);return B.current=t,B.current&&m?.(B.current),"execute"!==u.execution&&U(z?s[z]:{}),t},execute(){"execute"!==u.execution?console.warn('Execution mode is not set to "execute"'):e?.execute&&I.current&&B.current&&q()?(e.execute(I.current),U(z?s[z]:{})):console.warn("Turnstile has not been loaded or container not found")},isExpired:()=>e?.isExpired&&B.current&&q()?e.isExpired(B.current):(console.warn("Turnstile has not been loaded"),!1)}},[B,u.execution,z,$,I,q,O,m]),(0,t.useEffect)(()=>{if(O||!P)return;if(window.turnstile)return void M(!0);let e=setInterval(()=>{window.turnstile&&(M(!0),clearInterval(e))},50);return()=>{clearInterval(e)}},[O,P]),(0,t.useEffect)(()=>{U(E())},[u.execution,z,Z]),(0,t.useEffect)(()=>{P&&"function"==typeof y&&y()},[P]),(0,r.jsx)(n,{ref:I,as:N,id:A,style:{...S,...w},...T})});u.displayName="Turnstile",e.s(["Turnstile",0,u])},53160,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),n=e.i(95468);let a=(0,e.i(75254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var s=e.i(50861),o=e.i(11123);let i={firstName:"",lastName:"",email:"",phone:"",subject:"",text:""};e.s(["ContactForm",0,function(){let[e,l]=(0,r.useState)(i),[c,u]=(0,r.useState)({}),[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)(""),[f,h]=(0,r.useState)(null),[b,{isLoading:v}]=(0,o.useCreateContactUsMessageMutation)(),g=(0,r.useMemo)(()=>({firstName:e.firstName.trim()?"":"Zadajte meno.",lastName:e.lastName.trim()?"":"Zadajte priezvisko.",email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email.trim())?"":"Zadajte platný e-mail.",phone:e.phone.trim()?"":"Zadajte telefónne číslo.",subject:e.subject.trim()?"":"Zadajte predmet.",text:e.text.trim()?"":"Napíšte správu."}),[e]),y=Object.values(g).every(e=>!e),j=e=>{let{name:t,value:r}=e.target;l(e=>({...e,[t]:r})),x("")},w=e=>{let{name:t}=e.target;u(e=>({...e,[t]:!0}))},N=async t=>{if(t.preventDefault(),u({firstName:!0,lastName:!0,email:!0,phone:!0,subject:!0,text:!0}),x(""),y){if(!f)return void x("Potvrďte prosím, že nie ste robot.");try{await b({...e,captchaToken:f}).unwrap(),m(!0),l(i),u({}),h(null)}catch(e){x(function(e){if("object"==typeof e&&null!==e&&"data"in e&&"object"==typeof e.data){let t=e.data;if(t?.message)return t.message}return"Nepodarilo sa odoslať správu. Skúste to prosím znova."}(e))}}};return d?(0,t.jsxs)("div",{className:"mt-10 rounded-[28px] border border-emerald-200 bg-emerald-50 px-6 py-10 text-center sm:px-10 sm:py-14",children:[(0,t.jsx)("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-white text-emerald-600 shadow-sm ring-1 ring-emerald-100",children:(0,t.jsx)(n.CheckCircle2,{className:"h-8 w-8"})}),(0,t.jsx)("h3",{className:"mt-6 text-2xl font-bold tracking-tight text-zinc-900 sm:text-3xl",children:"Ďakujeme za vašu správu"}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-2xl text-base leading-8 text-zinc-600 sm:text-lg",children:"Vaša správa bola úspešne odoslaná. Ozveme sa vám čo najskôr a radi vám pomôžeme s čímkoľvek, čo potrebujete."})]}):(0,t.jsxs)("form",{className:"mt-10 space-y-6",onSubmit:N,children:[(0,t.jsxs)("div",{className:"grid gap-6 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"firstName",className:"mb-2 block text-sm font-medium text-zinc-700",children:"Meno"}),(0,t.jsx)("input",{id:"firstName",name:"firstName",type:"text",value:e.firstName,onChange:j,onBlur:w,placeholder:"Vaše meno",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.firstName&&g.firstName?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.firstName}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"lastName",className:"mb-2 block text-sm font-medium text-zinc-700",children:"Priezvisko"}),(0,t.jsx)("input",{id:"lastName",name:"lastName",type:"text",value:e.lastName,onChange:j,onBlur:w,placeholder:"Vaše priezvisko",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.lastName&&g.lastName?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.lastName}):null]})]}),(0,t.jsxs)("div",{className:"grid gap-6 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:"mb-2 block text-sm font-medium text-zinc-700",children:"E-mail"}),(0,t.jsx)("input",{id:"email",name:"email",type:"email",value:e.email,onChange:j,onBlur:w,placeholder:"vas@email.sk",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.email&&g.email?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.email}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",className:"mb-2 block text-sm font-medium text-zinc-700",children:"Telefón"}),(0,t.jsx)("input",{id:"phone",name:"phone",type:"tel",value:e.phone,onChange:j,onBlur:w,placeholder:"+421 ...",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.phone&&g.phone?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.phone}):null]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"subject",className:"mb-2 block text-sm font-medium text-zinc-700",children:"Predmet"}),(0,t.jsx)("input",{id:"subject",name:"subject",type:"text",value:e.subject,onChange:j,onBlur:w,placeholder:"Ako vám môžeme pomôcť?",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.subject&&g.subject?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.subject}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"text",className:"mb-2 block text-sm font-medium text-zinc-700",children:"Správa"}),(0,t.jsx)("textarea",{id:"text",name:"text",rows:6,value:e.text,onChange:j,onBlur:w,placeholder:"Napíšte nám vašu správu...",className:"w-full rounded-2xl border border-zinc-200 bg-[#fbfdfb] px-4 py-3 text-zinc-900 outline-none transition placeholder:text-zinc-400 focus:border-emerald-300 focus:ring-4 focus:ring-emerald-100"}),c.text&&g.text?(0,t.jsx)("p",{className:"mt-2 text-sm text-rose-600",children:g.text}):null]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsx)(s.Turnstile,{siteKey:"0x4AAAAAADIgUicmiF2ZZch-",options:{theme:"light"},onSuccess:e=>{h(e),x("")},onExpire:()=>{h(null)},onError:()=>{h(null),x("Captcha overenie zlyhalo. Skúste to prosím znova.")}}),(0,t.jsxs)("button",{type:"submit",disabled:v||!f,className:"inline-flex items-center justify-center gap-2 rounded-2xl bg-emerald-600 px-6 py-3 font-semibold text-white transition hover:bg-emerald-700 disabled:cursor-not-allowed disabled:opacity-70",children:[(0,t.jsx)(a,{className:"h-4 w-4"}),v?"Odosielam...":"Odoslať správu"]})]}),p?(0,t.jsx)("div",{className:"text-sm font-medium text-rose-600",children:p}):null,(0,t.jsx)("div",{className:"text-sm leading-7 text-zinc-500",children:"Odoslaním formulára súhlasíte so spracovaním údajov za účelom kontaktovania."})]})]})}],53160)}]);