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