"use strict";(globalThis.webpackChunkcaptain_widgets_kit=globalThis.webpackChunkcaptain_widgets_kit||[]).push([[472],{3472:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var n=a(6087),i=a(1609),l=a(4432);const s=[{id:1,tag:"Welcome",headline:"Build Elementor Widgets — Your Way.",subtext:"Captain Widgets Kit gives you a no-code visual builder to create, customize, and publish your own Elementor widgets directly from your WordPress dashboard.",highlights:[{icon:"⚡",label:"No Coding Required"},{icon:"🎨",label:"Visual Builder"},{icon:"📦",label:"Instant Publish"}]},{id:2,tag:"What's Inside",headline:"Everything You Need, Right Out of the Box.",subtext:"From drag-and-drop widget controls to WooCommerce-ready elements and WordPress extensions — all managed from one clean dashboard.",highlights:[{icon:"🧩",label:"Elementor Widgets"},{icon:"🛒",label:"WooCommerce Widgets"},{icon:"🔧",label:"WP Extensions"}]}],c=()=>{const[e,t]=(0,i.useState)(0),[a,c]=(0,i.useState)(!1),[o,r]=(0,i.useState)("forward"),d=s[e],m=e===s.length-1;(0,i.useEffect)(()=>{const e=document.getElementById("adminmenuwrap"),t=document.getElementById("wpadminbar"),a=document.getElementById("wpcontent"),n=document.getElementById("wpbody");return e&&(e.style.display="none"),t&&(t.style.display="none"),a&&(a.style.paddingLeft="0",a.style.marginTop="0"),n&&(n.style.marginTop="0"),()=>{e&&(e.style.display=""),t&&(t.style.display=""),a&&(a.style.paddingLeft="",a.style.marginTop=""),n&&(n.style.marginTop="")}},[]);const p=n=>{a||n===e||(r(n>e?"forward":"back"),c(!0),setTimeout(()=>{t(n),c(!1)},320))};return(0,n.createElement)("div",{className:"cw-onboarding-overlay"},(0,n.createElement)("div",{className:"cw-onboarding-modal"},(0,n.createElement)("div",{className:"cw-onboarding-left"},(0,n.createElement)("div",{className:"cw-brand"},(0,n.createElement)("div",{className:"cw-brand-icon"},(0,n.createElement)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none"},(0,n.createElement)("rect",{width:"28",height:"28",rx:"8",fill:"#4A745B"}),(0,n.createElement)("path",{d:"M7 14l5 5 9-9",stroke:"#fff",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}))),(0,n.createElement)("span",{className:"cw-brand-name"},"Captain Widgets Kit")),(0,n.createElement)("nav",{className:"cw-steps-nav"},s.map((t,a)=>(0,n.createElement)("button",{key:t.id,className:`cw-step-item ${a===e?"active":""} ${a<e?"done":""}`,onClick:()=>p(a)},(0,n.createElement)("span",{className:"cw-step-dot"},a<e?(0,n.createElement)("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},(0,n.createElement)("path",{d:"M2 5l2.5 2.5L8 3",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",fill:"none"})):a+1),(0,n.createElement)("span",{className:"cw-step-label"},t.tag)))),(0,n.createElement)("div",{className:"cw-left-deco","aria-hidden":"true"},(0,n.createElement)("div",{className:"cw-deco-circle c1"}),(0,n.createElement)("div",{className:"cw-deco-circle c2"}))),(0,n.createElement)("div",{className:"cw-onboarding-right"},(0,n.createElement)("div",{className:"cw-content-wrap "+(a?`exit-${o}`:"enter")},(0,n.createElement)("span",{className:"cw-tag"},d.tag),(0,n.createElement)("h1",{className:"cw-headline"},d.headline),(0,n.createElement)("p",{className:"cw-subtext"},d.subtext),(0,n.createElement)("div",{className:"cw-highlights"},d.highlights.map((e,t)=>(0,n.createElement)("div",{className:"cw-highlight-chip",key:t,style:{animationDelay:80*t+"ms"}},(0,n.createElement)("span",{className:"cw-highlight-icon"},e.icon),(0,n.createElement)("span",null,e.label)))),(0,n.createElement)("div",{className:"cw-actions"},(0,n.createElement)("button",{className:"captwiki-primary-button cw-cta",onClick:async()=>{a||(r("forward"),c(!0),m?(await(0,l.y)(captwiki_data?.captwiki_settings,"captwiki_onboarding",!0),c(!1)):setTimeout(async()=>{t(e=>e+1),c(!1)},320))}},m?"Get Started":"Continue",(0,n.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.createElement)("path",{d:"M3 8h10M9 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}))))),(0,n.createElement)("div",{className:"cw-progress-dots"},s.map((t,a)=>(0,n.createElement)("button",{key:a,className:"cw-dot "+(a===e?"active":""),onClick:()=>p(a),"aria-label":`Step ${a+1}`}))))))}},4432:(e,t,a)=>{a.d(t,{y:()=>l});var n=a(1083);let i=new AbortController;const l=async(e,t,a)=>{let l={...e};a?l[t]=a:delete l[t],i&&i.abort(),i=new AbortController;let s=new FormData;return s.append("action","captwiki_dashboard_ajax_call"),s.append("nonce",captwiki_data.captwiki_nonce),s.append("type","captwiki_manage_setting"),s.append("setting_data",JSON.stringify(l)),await n.A.post(captwiki_data.ajax_url,s,{signal:i.signal})}}}]);