"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[26],{148:(e,a,s)=>{var r=s(0),t=s(1),n=s(4);const i={tiktok:n.B,facebook:n.k,twitter:n.D,instagram:n.o},{wrapper:c}={wrapper:"WJ8EwU3u"},p=({socialIcons:e})=>(0,r.jsx)("div",Object.assign({className:c},{children:e.length>0&&e.map((({href:e,nameIcon:a})=>{const s=i[a];return(0,r.jsx)(t.Fragment,{children:(0,r.jsx)("a",Object.assign({target:"_blank",href:e},{children:s()}))})}))}));var l=s(184),o=s(2),d=s(111);const{wrapper:m,wrapperInput:u,wrapperEmailLabel:g,wrapperForm:w,wrapperArrow:j,wrapperNotCorrectEmail:h,wrapperSubmitted:x,wrapperIcons:b,wrapperHidden:f}={wrapper:"zuWlqBxB",wrapperForm:"HMfaPK4e",wrapperHidden:"HLhz_ZlM",wrapperArrow:"BImJizXr",wrapperInput:"gpqu6hmG",wrapperEmailLabel:"b23igrVj",wrapperSubmitted:"PwnxN9HL",wrapperNotCorrectEmail:"YZe3gj3P",wrapperIcons:"XhV13BYx"},v=({emailAddressLabel:e,notCorrectEmailMessage:a,successMessage:s,socialIcons:t})=>{const{isError:i,submitForm:c,setEmailValue:v,emailValue:I,isFormSubmitted:N,kalviyoErrorMessages:O,isSending:H}=(()=>{const[e,a]=(0,o.useState)(""),[s,r]=(0,o.useState)(!1),[t,n]=(0,o.useState)(!1),[i,c]=(0,o.useState)(!1),[p,l]=(0,o.useState)(""),[m,u]=(0,o.useState)(!1),g=()=>!!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e);return(0,o.useEffect)((()=>{if(i){const e=g();n(!e)}}),[e]),{isError:t,submitForm:a=>{return s=void 0,t=void 0,p=function*(){a.preventDefault();try{if(u(!0),m)return;if(g()){const a="Homepage footer signup form",s=(0,d.e)(e,a);if(!(yield(0,d.a)(d.c,s)).ok)return c(!1),n(!0),void l("
Something went wrong.
Please try again later.");c(!1),r(!0)}else c(!0),n(!0)}catch(e){console.log(e)}finally{u(!1)}},new((i=void 0)||(i=Promise))((function(e,a){function r(e){try{c(p.next(e))}catch(e){a(e)}}function n(e){try{c(p.throw(e))}catch(e){a(e)}}function c(a){var s;a.done?e(a.value):(s=a.value,s instanceof i?s:new i((function(e){e(s)}))).then(r,n)}c((p=p.apply(s,t||[])).next())}));var s,t,i,p},setEmailValue:a,emailValue:e,isFormSubmitted:s,kalviyoErrorMessages:p,isSending:m}})();return(0,r.jsxs)("div",Object.assign({className:m},{children:[O.length>0&&(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:O},className:x}),N&&(0,r.jsx)("div",{className:x,dangerouslySetInnerHTML:{__html:s}}),(0,r.jsxs)("div",Object.assign({className:(0,l.a)((N||O.length>0)&&f)},{children:[(0,r.jsxs)("form",Object.assign({className:w,noValidate:!0,onSubmit:c},{children:[(0,r.jsx)("input",{onChange:e=>v(e.currentTarget.value),className:u,type:"email",value:I,required:!0}),(0,r.jsx)("button",Object.assign({type:"submit",disabled:H,className:(0,l.a)(j)},{children:(0,r.jsx)(n.w,{})}))]})),!i&&(0,r.jsx)("p",Object.assign({className:g},{children:e})),i&&(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:a},className:h})]})),(0,r.jsx)("div",Object.assign({className:b},{children:(0,r.jsx)(p,{socialIcons:t})}))]}))},{wrapper:I,wrapperHeading:N,wrapperHeadingTitle:O,wrapperHeadingIcon:H,wrapperItem:y,wrapperItems:E,wrapperItemsExpand:S,wrapperDivider:M}={wrapper:"d80pCmeX",wrapperHeading:"v7d5dQR1",wrapperHeadingTitle:"Sp3yqoYh",wrapperItems:"hV_tBJ1l",wrapperItemsExpand:"KoSOI6Mw",wrapperItem:"iSppdyco",wrapperDivider:"KwFPP1tV",wrapperDividerOpen:"ZaJRnA49",wrapperHeadingIcon:"Dt_HNIRF"},k=({title:e,faqItem:a,handleExpandQuestion:s,activeQuestion:i})=>{const{ref:c}=((e,a)=>{const s=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(!s.current)return;const{scrollHeight:r,clientHeight:t}=s.current;e!==a&&0!==t?s.current.style.maxHeight="0px":e===a&&(s.current.style.maxHeight=`${r}px`)}),[e]),{ref:s}})(i,e),p=i===e;return(0,r.jsx)("div",Object.assign({className:I},{children:(0,r.jsxs)(t.Fragment,{children:[(0,r.jsxs)("div",Object.assign({onClick:()=>s(e),className:N},{children:[(0,r.jsx)("h2",Object.assign({className:O},{children:e})),(0,r.jsx)("span",Object.assign({className:H},{children:p?(0,r.jsx)(n.p,{}):(0,r.jsx)(n.u,{})}))]})),(0,r.jsx)("ul",Object.assign({ref:c,className:(0,l.a)(E,p&&S)},{children:a.map((({label:e,href:a,target:s})=>(0,r.jsx)("li",Object.assign({className:y},{children:(0,r.jsx)("a",Object.assign({target:s,href:a},{children:e}))}))))})),(0,r.jsx)("span",{className:M})]})}))},{wrapper:C}={wrapper:"cQd1zuyH"},q=({faq:e})=>{const{handleExpandQuestion:a,activeQuestion:s}=(()=>{const[e,a]=(0,o.useState)("");return{activeQuestion:e,handleExpandQuestion:(0,o.useCallback)((e=>{a((a=>a===e?"":e))}),[e])}})();return(0,r.jsx)("div",Object.assign({className:C},{children:e.length>0&&e.map((({links:e,title:t})=>(0,r.jsx)(k,{title:t,faqItem:e,handleExpandQuestion:a,activeQuestion:s})))}))},{wrapper:L}={wrapper:"Bdlq5SgL"},F=({methodPaymentImage:e})=>(0,r.jsx)("div",Object.assign({className:L},{children:(0,r.jsx)("img",Object.assign({},e))})),{wrapper:A,wrapperHeading:V,wrapperHeadingTitle:_,wrapperHeadingSubtitle:P,wrapperCopyright:Q,wrapperTop:T,wrapperIcons:z,wrapperMaxWidth:B}={wrapper:"oHYzfrIA",wrapperHeading:"qjDcmABx",wrapperHeadingTitle:"dm2VnYH5",wrapperHeadingSubtitle:"VyOqpWgE",wrapperCopyright:"AlN_eJKf",wrapperMaxWidth:"sWxCzirW",wrapperTop:"zlqhbLrE",wrapperIcons:"avDMH07K"},D=({title:e,subtitle:a,copyrightLabel:s,faq:t,emailAddressLabel:n,socialIcons:i,notCorrectEmailMessage:c,successMessage:l,methodPaymentImage:o})=>(0,r.jsx)("footer",Object.assign({id:"newFooter",className:A},{children:(0,r.jsxs)("div",Object.assign({className:B},{children:[(0,r.jsxs)("div",Object.assign({className:T},{children:[(0,r.jsxs)("div",Object.assign({className:V},{children:[(0,r.jsx)("h2",Object.assign({className:_},{children:e})),(0,r.jsx)("p",Object.assign({className:P},{children:a}))]})),(0,r.jsx)(v,{emailAddressLabel:n,notCorrectEmailMessage:c,successMessage:l,socialIcons:i})]})),(0,r.jsx)(q,{faq:t}),(0,r.jsx)("div",Object.assign({className:z},{children:(0,r.jsx)(p,{socialIcons:i})})),(0,r.jsx)(F,{methodPaymentImage:o}),(0,r.jsx)("p",Object.assign({className:Q},{children:s}))]}))}));(0,s(3).createEntrypoint)("footer",(function({newFooter:e}){return(0,r.jsx)(D,Object.assign({},e))}))}},e=>{e.O(0,[1,2,3,4,19],(()=>(148,e(e.s=148)))),e.O()}]);