"use strict";(globalThis.webpackChunkathemes_starter_sites=globalThis.webpackChunkathemes_starter_sites||[]).push([[453],{296:(e,t,s)=>{s.r(t),s.d(t,{default:()=>g});var a=s(87),i=s(723),n=s(427),r=s(809),o=s(374),d=s(460);const l=s.p+"images/optin.c6cceeff.jpg",c=s.p+"images/optin-sydney.4ef21437.jpg",m=s.p+"images/optin-botiga.29c4f095.jpg",h=s.p+"images/hands.03c96543.png",_=s.p+"images/heart.409baa78.gif";var p=s(874),x=s(668),b=s(790);const g=function({onBack:e,onContinue:t}){const{wizardData:s}=(0,r.X)(),g=s.optin||{},[u,w]=(0,a.useState)(g.email||window.atssOnboarding?.adminEmail||""),[k,j]=(0,a.useState)(!1),[y,f]=(0,a.useState)(""),[v,N]=(0,a.useState)(void 0===g.optinChecked||g.optinChecked),z=(0,a.useMemo)(()=>{const e=(window.atssOnboarding?.themeName||"sydney").toLowerCase();return e.includes("botiga")?m:e.includes("sydney")?c:l},[]),S={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,b.jsxs)("div",{className:"atss-onboarding-wizard__step atss-onboarding-wizard__step--optin",children:[(0,b.jsx)("main",{className:"atss-onboarding-wizard__step-body",children:(0,b.jsxs)("div",{className:"atss-onboarding-wizard__step-body-content w100",children:[(0,b.jsx)("img",{src:z,alt:(0,i.__)("Optin","athemes-starter-sites"),width:"1200",height:"536"}),(0,b.jsxs)("div",{className:"atss-onboarding-wizard__step-body-content-inner",children:[(0,b.jsx)("h2",{className:"atss-onboarding-wizard__step-body-title text-xl font-medium",children:S.wizardTitle}),(0,b.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,b.jsxs)("div",{className:"atss-form-field w100"+(y?" atss-form-field--has-error":""),children:[(0,b.jsx)(n.TextControl,{label:(0,i.__)("Email","athemes-starter-sites"),placeholder:(0,i.__)("Enter your email address","athemes-starter-sites"),value:u,onChange:e=>{w(e),k&&y&&(0,d.DT)(e)&&f("")},onBlur:()=>{j(!0),u&&!(0,d.DT)(u)?f((0,i.__)("Please enter a valid email address","athemes-starter-sites")):f("")},type:"email",pattern:"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$",required:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),y&&(0,b.jsx)("span",{className:"atss-form-field__error",children:y})]}),(0,b.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,b.jsxs)("div",{className:"atss-optin-box",children:[(0,b.jsxs)("div",{className:"atss-optin-box__icon",children:[(0,b.jsx)("img",{src:h,alt:""}),!v&&(0,b.jsx)("img",{src:_,alt:"",className:"atss-optin-box__icon-overlay"})]}),(0,b.jsxs)("div",{className:"atss-optin-box__text",children:[(0,b.jsx)("h3",{className:"atss-optin-box__title",children:S.newsletterTitle}),(0,b.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,b.jsx)("a",{href:"https://athemes.com/terms/",target:"_blank",rel:"noopener noreferrer"})})})]}),(0,b.jsx)("button",{type:"button",className:"atss-optin-box__checkbox "+(v?"atss-optin-box__checkbox--checked":""),onClick:()=>{N(!v)},"aria-checked":v,"aria-label":v?(0,i.__)("Disable usage tracking","athemes-starter-sites"):(0,i.__)("Enable usage tracking","athemes-starter-sites"),children:v&&(0,b.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,b.jsx)("path",{d:"M1 5L4.5 8.5L11 1",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})}),(0,b.jsx)(o.wi,{showBack:!0,showSkip:!0,continueText:(0,i.__)("Start Import","athemes-starter-sites"),onBack:e,onSkip:()=>{(0,x.v)("onboarding_optin_completed",{step:"optin",optin_checked:!1}),t({email:"",optinChecked:!1},!0)},onContinue:()=>{(0,x.v)("onboarding_optin_completed",{step:"optin",optin_checked:!!v}),t({email:u,optinChecked:v})}})]})}}}]);