"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5637],{35637:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}});var a=n(52322),i=n(12524),l=n.n(i),o=n(2784),c=n(27628),s=n(26841);let r=e=>{let{autoShowCloseButton:t,autoShowCloseButtonTime:n,backgroundColor:i,closeButtonSide:r,children:u,className:d,...m}=e,[h,k]=(0,o.useState)(!0),[y,v]=(0,o.useState)(!1),{isAmp:b}=(0,s.Z)();return((0,o.useEffect)(()=>{let e=null,t=null;return e=setInterval(()=>{t=setTimeout(()=>{clearInterval(e),c.T.hidden("ad","Sticky","cleaning interval of sticky element after 5 sec")},5e3);try{let{body:n}=document;n.querySelectorAll(".-variation-sticky-element-mobile iframe").length>0&&(n.classList.add("padding-bottom-sticky"),clearInterval(e),clearTimeout(t),c.T.hidden("ad","Sticky","cleaning interval check of sticky element no ads"))}catch(e){c.T.hidden("ad","Sticky","something went wrong with the sticky element")}},100),()=>{clearInterval(e),clearTimeout(t)}},[]),b)?(0,a.jsx)(a.Fragment,{children:u}):(t&&setTimeout(()=>{v(!0)},n),(0,a.jsxs)("div",{className:l()([d,"-variation-sticky-element-mobile"],{"-variation-sticky-element--hide":!h}),...m,children:[(0,a.jsx)("div",{className:l()("-variation-sticky-element-bg",{["-variation-sticky-element-bg--".concat(i)]:i}),children:(0,a.jsx)("button",{type:"button",className:l()("-variation-sticky-element-close",{["-variation-sticky-element-close--".concat(r)]:r,"-variation-sticky-element--hide":!y}),"aria-label":"Close banner",onClick:()=>{k(!1),document.querySelector("body").classList.remove("padding-bottom-sticky")},children:"✕"})}),u]}))};r.defaultProps={className:null,autoShowCloseButton:!1,autoShowCloseButtonTime:5e3,backgroundColor:"white",closeButtonSide:"right"};var u=e=>{let{data:{autoShowCloseButton:t,autoShowCloseButtonTime:n,backgroundColor:i,closeButtonSide:l},children:o}=e;return(0,a.jsx)(r,{autoShowCloseButton:t,autoShowCloseButtonTime:1e3*n,backgroundColor:i,closeButtonSide:l,children:o})}}}]);