import{B as e,Ct as t,Ft as n,H as r,It as i,K as ee,L as a,Mt as o,Q as s,R as c,U as l,V as u,W as d,Z as f,_t as p,at as m,d as h,ft as g,ht as _,jt as v,mt as y,ot as b,pt as x,st as S,tt as C,wt as w,yt as T}from"../chunks/BA99CCI5.js";import{t as E}from"../chunks/BJ4akexL.js";import"../chunks/xihTtKlq.js";import"../chunks/DGo8yE5j.js";import{t as D}from"../chunks/B66v-P2b.js";import{t as O}from"../chunks/BlAgBW4v.js";import{r as te}from"../chunks/Da9e11Mg.js";import{i as k,r as ne,t as A}from"../chunks/CNiXNkto2.js";import{t as j}from"../chunks/BBtCGbx62.js";import{t as M}from"../chunks/CNfB0kJd.js";import{t as N}from"../chunks/DCohNkHF.js";import{t as P}from"../chunks/CWc174af.js";import{t as F}from"../chunks/Cf96lmLi2.js";var I=d(`<div class="flex items-center gap-4 px-6 py-4"><div class="min-w-0 flex-1"><div class="flex items-center gap-2"><h3 class="text-sm font-semibold text-neutral-900 dark:text-neutral-100"> </h3> <!></div> <p class="mt-1 text-xs text-neutral-600 dark:text-neutral-400"> </p></div> <!></div>`),L=d(`<div class="divide-y divide-neutral-200 dark:divide-neutral-700/60"></div>`),R=d(`<!> <div class="p-4 md:p-8"><div class="mb-8"><h1 class="text-2xl font-bold text-neutral-900 md:text-3xl dark:text-neutral-50">Onboarding</h1> <p class="mt-2 text-base text-neutral-600 md:mt-3 md:text-lg dark:text-neutral-400">Guided walkthroughs to help you get the most out of Profilarr. Run any stage at your own pace.</p></div> <div class="space-y-6"><!> <!></div></div>`,1);function z(d,z){o(z,!1);let B=()=>w(q,`$filtered`,V),[V,H]=t(),U=_(),W=_(),G=Object.entries(k).map(([e,t])=>({id:e,name:t.name,description:t.description,steps:t.steps.length})),{search:K,filtered:q}=P(G,{storageKey:`onboardingView`,searchKeys:[`name`,`description`]});async function J(e){if(window.innerWidth<768){E.add(`warning`,`Onboarding walkthroughs are only available on desktop. Move to a larger screen to continue.`);return}await A.startStage(e)}m(()=>B(),()=>{p(U,new Set(B().map(e=>e.id)))}),m(()=>s(U),()=>{p(W,ne.map(e=>({...e,stages:e.stages.filter(e=>s(U).has(e))})).filter(e=>e.stages.length>0))}),b(),h();var Y=R(),X=x(Y);N(X,{title:`Onboarding`});var Z=y(X,2),Q=y(g(Z),2),$=g(Q);M($,{children:(e,t)=>{te(e,{get searchStore(){return K},placeholder:`Search stages...`,responsive:!0})},$$slots:{default:!0}});var re=y($,2);a(re,1,()=>s(W),c,(t,o)=>{F(t,{get title(){return s(o),C(()=>s(o).name)},get description(){return s(o),C(()=>s(o).description)},children:(t,d)=>{var p=L();a(p,5,()=>(s(o),C(()=>s(o).stages)),c,(t,a)=>{let o=T(()=>(f(k),s(a),C(()=>k[s(a)])));var c=l(),d=x(c),p=e=>{var t=I(),c=g(t),l=g(c),d=g(l),p=g(d,!0);i(d);var m=y(d,2);j(m,{variant:`secondary`,size:`sm`,rounded:`md`,children:(e,t)=>{n();var i=ee();S(()=>u(i,`${f(s(o)),C(()=>s(o).steps.length)??``}
											${f(s(o)),C(()=>s(o).steps.length===1?`step`:`steps`)??``}`)),r(e,i)},$$slots:{default:!0}}),i(l);var h=y(l,2),_=g(h,!0);i(h),i(c);var v=y(c,2);D(v,{text:`Start`,get icon(){return O},iconColor:`text-accent-600 dark:text-accent-400`,size:`sm`,$$events:{click:()=>J(s(a))}}),i(t),S(()=>{u(p,(f(s(o)),C(()=>s(o).name))),u(_,(f(s(o)),C(()=>s(o).description)))}),r(e,t)};e(d,e=>{s(o)&&e(p)}),r(t,c)}),i(p),r(t,p)},$$slots:{default:!0}})}),i(Q),i(Z),r(d,Y),v(),H()}export{z as component};