"use strict";(self.webpackChunknewfold_Onboarding=self.webpackChunknewfold_Onboarding||[]).push([[871],{1852:(e,t,n)=>{n.d(t,{A:()=>w});var a=n(1609),r=n(148),o=n(7143),s=n(7675),i=n(264),l=n(6079),d=n(8969),c=n(1056),u=n(2202),p=n(8559),m=n(6942),b=n.n(m),g=n(7677);const w=({text:e,disabled:t,className:n,icon:m})=>{const w=(0,r.Zp)(),{nextStep:f,currentData:_}=(0,o.useSelect)((e=>({nextStep:e(s.M).getNextStep(),currentData:e(s.M).getCurrentOnboardingData()})),[]),v=null===f||!1===f;return(0,a.createElement)(i.A,{className:b()("nfd-nav-card-button",n),handleClick:()=>v?async function(){_&&(_.isComplete=(new Date).getTime(),_.data.siteOverrideConsent=!1,(0,l.V1)(_)),(0,p.YR)(),(0,c.SV)(new c.iC(u.Vg)),window.location.replace(d.R0)}():w(f.path),disabled:t},(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:`${n}__text`},e),m&&(0,a.createElement)(g.A,{className:`${n}__icon`,icon:m})))}},4871:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var a=n(1609),r=n(3988),o=n(5842),s=n(9927),i=n(1852),l=n(9889),d=n(8969),c=n(7675),u=n(6427),p=n(8468),m=n(7143),b=n(431),g=n(7723),w=n(3474);var f=n(1056),_=n(2202);const v=()=>{const[e,t]=(0,p.useState)("0"),{currentData:n}=(0,m.useSelect)((e=>({currentData:e(c.M).getCurrentOnboardingData()})),[]),{setDrawerActiveView:v,setCurrentOnboardingData:h,setSidebarActiveView:C,setIsDrawerSuppressed:E,setIsHeaderNavigationEnabled:x}=(0,m.useDispatch)(c.M);(0,p.useEffect)((()=>{C(d.Qe),E(!0),v(d.lf),x(!0)}),[]),(0,p.useEffect)((()=>{!async function(){t(n.data.wpComfortLevel)}()}),[]);const A={heading:(0,g.sprintf)(/* translators: %s: website or store */ /* translators: %s: website or store */
(0,g.__)("Help us tailor this setup to your %s","wp-module-onboarding"),(0,w.P)("site")),subheading:(0,g.__)("ABOUT YOU","wp-module-onboarding"),question:(0,g.__)("What is your experience with WordPress?","wp-module-onboarding"),buttonText:(0,g.__)("Continue Setup","wp-module-onboarding"),options:[{label:(0,g.__)("Never used it","wp-module-onboarding"),slug:"novice",value:"1"},{label:(0,g.__)("Used it some","wp-module-onboarding"),slug:"intermediate",value:"3"},{label:(0,g.__)("I'm an expert","wp-module-onboarding"),slug:"expert",value:"5"}]};return(0,a.createElement)(r.A,{isBgPrimary:!0,isCentered:!0},(0,a.createElement)(o.A,null,(0,a.createElement)("div",{className:"nfd-onboarding-experience-step"},(0,a.createElement)("div",{className:"nfd-card-heading center"},(0,a.createElement)(s.A,{heading:A.heading,subHeading:A.subheading,question:A.question})),(0,a.createElement)(b.A,{type:"fade-in-disabled",after:e},(0,a.createElement)(u.RadioControl,{className:"nfd-onboarding-experience-step-tabs components-radio-control__input radio-control-main",selected:e,options:A.options.map((e=>({label:e.label,value:e.value}))),onChange:e=>(e=>{t(e);const a=n;a.data.wpComfortLevel=e||"0",h(a),(0,f.v)(new f.iC(_.k2,A.options.filter((t=>t.value===e))[0].slug))})(e)})),(0,a.createElement)(i.A,{text:A.buttonText,disabled:"0"===e}),(0,a.createElement)(l.A,null))))}}}]);