"use strict";(globalThis.webpackChunkathemes_starter_sites=globalThis.webpackChunkathemes_starter_sites||[]).push([[453],{296:(e,s,t)=>{t.r(s),t.d(s,{default:()=>b});var a=t(87),i=t(723),r=t(427),n=t(809),o=t(374),l=t(460);const d=t.p+"images/optin.c6cceeff.jpg",c=t.p+"images/optin-sydney.4ef21437.jpg",m=t.p+"images/optin-botiga.29c4f095.jpg",h=t.p+"images/hands.03c96543.png",_=t.p+"images/heart.409baa78.gif";var p=t(874),x=t(790);const b=function({onBack:e,onContinue:s}){const{wizardData:t}=(0,n.X)(),b=t.optin||{},[g,u]=(0,a.useState)(b.email||window.atssOnboarding?.adminEmail||""),[w,k]=(0,a.useState)(!1),[j,y]=(0,a.useState)(""),[f,v]=(0,a.useState)(void 0===b.optinChecked||b.optinChecked),N=(0,a.useMemo)(()=>{const e=(window.atssOnboarding?.themeName||"sydney").toLowerCase();return e.includes("botiga")?m:e.includes("sydney")?c:d},[]),z={wizardTitle:p.A?(0,i.__)("Stay Updated With the Latest Releases","athemes-starter-sites"):(0,i.__)("Stay Updated with Latest Features & Releases","athemes-starter-sites"),newsletterTitle:p.A?(0,i.__)("Help Make Botiga Better For All!","athemes-starter-sites"):(0,i.__)("Help make Sydney better for all!","athemes-starter-sites")};return(0,x.jsxs)("div",{className:"atss-onboarding-wizard__step atss-onboarding-wizard__step--optin",children:[(0,x.jsx)("main",{className:"atss-onboarding-wizard__step-body",children:(0,x.jsxs)("div",{className:"atss-onboarding-wizard__step-body-content w100",children:[(0,x.jsx)("img",{src:N,alt:(0,i.__)("Optin","athemes-starter-sites"),width:"1200",height:"536"}),(0,x.jsxs)("div",{className:"atss-onboarding-wizard__step-body-content-inner",children:[(0,x.jsx)("h2",{className:"atss-onboarding-wizard__step-body-title text-xl font-medium",children:z.wizardTitle}),(0,x.jsx)("p",{className:"atss-onboarding-wizard__step-body-description text-sm text-secondary",children:(0,i.__)("Subscribe to our newsletter to get notified about new updates, features, and releases.","athemes-starter-sites")}),(0,x.jsxs)("div",{className:"atss-form-field w100"+(j?" atss-form-field--has-error":""),children:[(0,x.jsx)(r.TextControl,{label:(0,i.__)("Email","athemes-starter-sites"),placeholder:(0,i.__)("Enter your email address","athemes-starter-sites"),value:g,onChange:e=>{u(e),w&&j&&(0,l.DT)(e)&&y("")},onBlur:()=>{k(!0),g&&!(0,l.DT)(g)?y((0,i.__)("Please enter a valid email address","athemes-starter-sites")):y("")},type:"email",pattern:"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$",required:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),j&&(0,x.jsx)("span",{className:"atss-form-field__error",children:j})]}),(0,x.jsx)("p",{className:"text-xs text-tertiary text-align-left",children:(0,i.__)("Your email is needed so you can receive community exclusive recommendations.","athemes-starter-sites")}),(0,x.jsxs)("div",{className:"atss-optin-box",children:[(0,x.jsxs)("div",{className:"atss-optin-box__icon",children:[(0,x.jsx)("img",{src:h,alt:""}),!f&&(0,x.jsx)("img",{src:_,alt:"",className:"atss-optin-box__icon-overlay"})]}),(0,x.jsxs)("div",{className:"atss-optin-box__text",children:[(0,x.jsx)("h3",{className:"atss-optin-box__title",children:z.newsletterTitle}),(0,x.jsx)("p",{className:"atss-optin-box__description",children:(0,a.createInterpolateElement)((0,i.__)("By enabling you agree to our <a>Terms of Service</a> and to share your non-sensitive information with aThemes.","athemes-starter-sites"),{a:(0,x.jsx)("a",{href:"https://athemes.com/terms/",target:"_blank",rel:"noopener noreferrer"})})})]}),(0,x.jsx)("button",{type:"button",className:"atss-optin-box__checkbox "+(f?"atss-optin-box__checkbox--checked":""),onClick:()=>{v(!f)},"aria-checked":f,"aria-label":f?(0,i.__)("Disable usage tracking","athemes-starter-sites"):(0,i.__)("Enable usage tracking","athemes-starter-sites"),children:f&&(0,x.jsx)("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"atss-optin-box__checkmark",children:(0,x.jsx)("path",{d:"M1 5L4.5 8.5L11 1",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})}),(0,x.jsx)(o.wi,{showBack:!0,showSkip:!0,continueText:(0,i.__)("Start Import","athemes-starter-sites"),onBack:e,onSkip:()=>{s({email:"",optinChecked:!1})},onContinue:()=>{s({email:g,optinChecked:f})}})]})}}}]);