"use strict";(globalThis.webpackChunknewfold_Onboarding=globalThis.webpackChunknewfold_Onboarding||[]).push([[367],{367:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var s=a(1609),l=a(7143),r=a(8468),n=a(148),c=a(6427),o=a(8294),i=a(7044),_=a(2364),m=a(3988),p=a(8969),h=a(2940),d=a(7675),b=a(8520),u=a(1032);const w=()=>{const e=(0,_.A)(),t=(0,n.zy)(),[a,w]=(0,r.useState)(),[g,S]=(0,r.useState)(!1),v=(0,n.Zp)(),{currentStep:E,currentData:k,allSteps:y,themeStatus:x}=(0,l.useSelect)((e=>({currentStep:e(d.M).getStepFromPath(t.pathname),currentData:e(d.M).getCurrentOnboardingData(),allSteps:e(d.M).getAllSteps(),themeStatus:e(d.M).getThemeStatus()})),[]),{setDrawerActiveView:f,setSidebarActiveView:C,setCurrentOnboardingData:N,updateThemeStatus:A,updateAllSteps:D}=(0,l.useDispatch)(d.M);(0,r.useEffect)((()=>{C(p.Qe),f(p.PE),M(k.data.customDesign,!1,"flow")}),[]);const M=(e,t=!0,a="click")=>{if(S(e),e){const e=(0,h.xG)(y,o.x.conditionalSteps);D(e.allSteps)}else{const e=(0,h.x9)(y,o.x.conditionalSteps);D(e.allSteps)}t&&(k.data.customDesign=e,N(k)),e&&"click"===a&&v(o.x.conditionalSteps[0].path)};return(0,r.useEffect)((()=>{x===p.Er&&(async()=>{const e=await(0,b.O)(E?.data?.patternId,!0);if(e?.error)return A(p.So);w(e?.body)})()}),[x]),(0,s.createElement)(u.UX,null,(0,s.createElement)(i.Th,null,(0,s.createElement)(m.A,{className:"theme-styles-preview"},(0,s.createElement)("div",{className:"theme-styles-preview__checkbox"},(0,s.createElement)(c.CheckboxControl,{label:(0,s.createElement)("div",{className:"theme-styles-preview__checkbox__label"},(0,s.createElement)("span",{className:"theme-styles-preview__checkbox__label__question"},e.checkbox_label,(0,s.createElement)("span",{className:"theme-styles-preview__checkbox__label__hint"},e.checkbox_hint))),checked:g,onChange:()=>M(!g)})),(0,s.createElement)("div",{className:"theme-styles-preview__title-bar"},(0,s.createElement)("div",{className:"theme-styles-preview__title-bar__browser"},(0,s.createElement)("span",{className:"theme-styles-preview__title-bar__browser__dot"}),(0,s.createElement)("span",{className:"theme-styles-preview__title-bar__browser__dot"}),(0,s.createElement)("span",{className:"theme-styles-preview__title-bar__browser__dot"}))),!a&&(0,s.createElement)(i.pA,{styling:"large",viewportWidth:1300}),a&&(0,s.createElement)(i.pA,{blockGrammer:a,styling:"large",viewportWidth:1300}))))}},2364:(e,t,a)=>{a.d(t,{A:()=>l});var s=a(7723);const l=()=>({heading:(0,s.__)("Lets tailor your theme for the perfect fit","wp-module-onboarding"),subheading:(0,s.__)("Start with a style preset or","wp-module-onboarding"),
/* translators: build a custom design is a link, this would be concatenated with "Start with a style preset or" making it
     "Start with a style preset or build a custom design."*/
subheading_link:(0,s.__)("build a custom design.","wp-module-onboarding"),checkbox_label:(0,s.__)("Customize Colors & Fonts?","wp-module-onboarding"),checkbox_hint:(0,s.__)("Check to customize in the next few steps (or leave empty and use the Site Editor later)","wp-module-onboarding")})}}]);