import{d as R,bP as C,j as t,aR as B,aS as D,f as b,q as T,o as a,n as N,m as n,p as e,bQ as U,aW as V,h as W,W as j,u as E,al as P,i as $,bu as q,bR as z,k as F,c,l as o,a as d,a6 as L,bz as M,bS as O,bT as Q,bU as Z,be as A}from"./index-C_HOOOpe.js";import{s as G}from"./index-B4HswuBc.js";import{u as H}from"./usePageTitle-DzYzWO1v.js";const J={class:"flow-stats"},K={class:"flow-stats__cards"},X=R({__name:"FlowStats",props:{flowId:{}},setup(w){const f=w,r={range:{type:"span",seconds:-604800}},{flowId:u}=C(f),i=t(()=>({flowId:u.value,range:r.range}));B(D,{interval:G(30)});const l=t(()=>b.map("FlowStatsFilter",i.value,"FlowRunsFilter")),p=t(()=>b.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,m)=>(a(),T("div",J,[N("div",K,[n(e(U),{filter:l.value},null,8,["filter"]),n(e(V),{filter:p.value},null,8,["filter"])])]))}}),le=R({__name:"Flow",setup(w){const f=W(),r=j("flowId"),u=t(()=>[r.value]),i=E(),l=P("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},m=$(f.flows.getFlow,[r.value],_),s=t(()=>m.response),{filter:y}=q({flows:{id:u}}),{filter:k}=z({flows:{id:u}});function x(){i.push(A.flows())}const h=t(()=>s.value?`Flow: ${s.value.name}`:"Flow");return H(h),(Y,v)=>{const S=F("p-tabs"),g=F("p-layout-default");return a(),c(g,{class:"flow"},{header:o(()=>[s.value?(a(),c(e(Z),{key:0,flow:s.value,onDelete:x},null,8,["flow"])):d("",!0)]),default:o(()=>[s.value?(a(),c(X,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):d("",!0),n(S,{selected:e(l),"onUpdate:selected":v[0]||(v[0]=I=>L(l)?l.value=I:null),tabs:p},{details:o(()=>[s.value?(a(),c(e(Q),{key:0,flow:s.value},null,8,["flow"])):d("",!0)]),deployments:o(()=>[n(e(O),{filter:e(k),prefix:"deployments"},null,8,["filter"])]),runs:o(()=>[n(e(M),{filter:e(y),selectable:"",prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{le as default};
//# sourceMappingURL=Flow-3xTghvTV.js.map
