"use strict";(globalThis.webpackChunknewfold_Onboarding=globalThis.webpackChunknewfold_Onboarding||[]).push([[871],{1852:(e,t,n)=>{n.d(t,{A:()=>w});var a=n(1609),o=n(148),r=n(7143),i=n(7675),l=n(264),s=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,o.Zp)(),{nextStep:_,currentData:v}=(0,r.useSelect)((e=>({nextStep:e(i.M).getNextStep(),currentData:e(i.M).getCurrentOnboardingData()})),[]),f=null===_||!1===_;return(0,a.createElement)(l.A,{className:b()("nfd-nav-card-button",n),handleClick:()=>f?async function(){v&&(v.isComplete=(new Date).getTime(),v.data.siteOverrideConsent=!1,(0,s.V1)(v)),(0,p.YR)(),(0,c.SV)(new c.iC(u.Vg)),window.location.replace(d.R0)}():w(_.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:()=>f});var a=n(1609),o=n(3988),r=n(5842),i=n(9927),l=n(1852),s=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 _=n(1056),v=n(2202);const f=()=>{const[e,t]=(0,p.useState)("0"),{currentData:n}=(0,m.useSelect)((e=>({currentData:e(c.M).getCurrentOnboardingData()})),[]),{setDrawerActiveView:f,setCurrentOnboardingData:h,setSidebarActiveView:C,setIsDrawerSuppressed:E,setIsHeaderNavigationEnabled:x}=(0,m.useDispatch)(c.M);(0,p.useEffect)((()=>{C(d.Qe),E(!0),f(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)(o.A,{isBgPrimary:!0,isCentered:!0},(0,a.createElement)(r.A,null,(0,a.createElement)("div",{className:"nfd-onboarding-experience-step"},(0,a.createElement)("div",{className:"nfd-card-heading center"},(0,a.createElement)(i.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,_.v)(new _.iC(v.k2,A.options.filter((t=>t.value===e))[0].slug))})(e)})),(0,a.createElement)(l.A,{text:A.buttonText,disabled:"0"===e}),(0,a.createElement)(s.A,null))))}}}]);