import{A as e,B as t,D as n,E as r,H as i,I as a,J as o,K as s,M as c,O as l,X as u,at as d,d as f,et as p,lt as m,ot as h,ut as g,w as _,x as v}from"../chunks/DyGQ_VXC.js";import"../chunks/CQCxd1p9.js";import{a as y,r as b}from"../chunks/CEqOYim7.js";import"../chunks/CqF5Lomf.js";var x=e(`<meta name="robots" content="noindex"/>`),S=e(`<div class="error svelte-nwg4kk" role="alert"> </div>`),C=e(`<p class="muted svelte-nwg4kk">No sagas or standalone epics in this project yet. Create one with <code class="svelte-nwg4kk">cleo saga create</code>.</p>`),w=e(`<li><a class="root svelte-nwg4kk"><span class="root-id svelte-nwg4kk"><code class="svelte-nwg4kk"> </code></span> <span class="root-title svelte-nwg4kk"> </span> <span class="root-meta svelte-nwg4kk"><!> <!> <span class="count svelte-nwg4kk"> </span></span></a></li>`),T=e(`<ul class="roots svelte-nwg4kk"></ul>`),E=e(`<section class="picker svelte-nwg4kk"><header class="picker-head svelte-nwg4kk"><div><span class="eyebrow svelte-nwg4kk">OPERATOR CONSOLE</span> <h1 class="svelte-nwg4kk"> </h1> <p class="muted svelte-nwg4kk">Pick a saga to open its workgraph + live dispatcher board.</p></div></header> <!></section>`);function D(e,D){h(D,!0);function O(e){return e===`done`?`success`:e===`active`?`info`:e===`blocked`?`danger`:e===`pending`?`warning`:`neutral`}var k=E();v(`nwg4kk`,e=>{var n=x();t(()=>{s.title=`${D.data.projectName??``} sagas — CLEO Studio`}),l(e,n)});var A=o(k),j=o(A),M=u(o(j),2),N=o(M);g(M),m(2),g(j),g(A);var P=u(A,2),F=e=>{b(e,{padding:`cozy`,children:(e,t)=>{var r=S(),a=o(r,!0);g(r),i(()=>n(a,D.data.error)),l(e,r)},$$slots:{default:!0}})},I=e=>{b(e,{padding:`cozy`,children:(e,t)=>{l(e,C())},$$slots:{default:!0}})},L=e=>{var t=T();_(t,21,()=>D.data.roots,e=>e.id,(e,t)=>{var r=w(),s=o(r),d=o(s),h=o(d),_=o(h,!0);g(h),g(d);var v=u(d,2),b=o(v,!0);g(v);var x=u(v,2),S=o(x);y(S,{tone:`info`,size:`sm`,children:(e,r)=>{m();var o=c();i(()=>n(o,a(t).type)),l(e,o)},$$slots:{default:!0}});var C=u(S,2);{let e=p(()=>O(a(t).status));y(C,{get tone(){return a(e)},size:`sm`,children:(e,r)=>{m();var o=c();i(()=>n(o,a(t).status)),l(e,o)},$$slots:{default:!0}})}var T=u(C,2),E=o(T);g(T),g(x),g(s),g(r),i(()=>{f(s,`href`,`/studio/${D.data.projectId}/${a(t).id}`),n(_,a(t).id),n(b,a(t).title),n(E,`${a(t).descendantCount??``} tasks`)}),l(e,r)}),g(t),l(e,t)};r(P,e=>{D.data.error?e(F):D.data.roots.length===0?e(I,1):e(L,-1)}),g(k),i(()=>n(N,`${D.data.projectName??``} — Sagas`)),l(e,k),d()}export{D as component};