import{d as y,aJ as S,J as h,h as l,G as B,H as C,b as F,o as r,m as D,O as N,n as a,u as e,aK as T,W as U,R as O,M as $,U as H,_ as J,I as j,f as A,ao as E,aL as G,k as R,c,l as n,aM as K,a as w,aN as L,aO as P,ax as W,A as q,af as z}from"./index-gULJbqdd.js";import{a as Q,s as X}from"./index-oxmGsOwU.js";import{u as Y}from"./usePageTitle-HrbxxOEb.js";const Z={class:"flow-stats"},ee={class:"flow-stats__cards"},se=y({__name:"FlowStats",props:{flowId:{}},setup(m){const d=m,{flowId:u}=S(d),t=h({range:{type:"span",seconds:-Q},tags:[]}),i=l(()=>({flowId:u.value,range:t.range}));B(C,{interval:X(30)});const o=l(()=>F.map("FlowStatsFilter",i.value,"FlowRunsFilter")),p=l(()=>F.map("FlowStatsFilter",i.value,"TaskRunsFilter"));return(_,f)=>(r(),D("div",Z,[N("div",ee,[a(e(T),{filter:o.value},null,8,["filter"]),a(e(U),{filter:p.value},null,8,["filter"])]),a(e(O),{modelValue:e(t).range,"onUpdate:modelValue":f[0]||(f[0]=s=>e(t).range=s),small:""},null,8,["modelValue"])]))}}),ne=y({__name:"Flow",setup(m){const d=$(),u=H("flowId"),t=l(()=>[u.value]),i=J(),o=j("tab","Runs"),p=["Runs","Deployments","Details"],_={interval:3e5},f=A(d.flows.getFlow,[u.value],_),s=l(()=>f.response),{filter:b}=E({flows:{id:t}}),{filter:k}=G({flows:{id:t}});function g(){i.push(z.flows())}const I=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return Y(I),(te,v)=>{const x=R("p-tabs"),V=R("p-layout-default");return r(),c(V,{class:"flow"},{header:n(()=>[s.value?(r(),c(e(K),{key:0,flow:s.value,onDelete:g},null,8,["flow"])):w("",!0)]),default:n(()=>[s.value?(r(),c(se,{key:0,"flow-id":s.value.id},null,8,["flow-id"])):w("",!0),a(x,{selected:e(o),"onUpdate:selected":v[0]||(v[0]=M=>q(o)?o.value=M:null),tabs:p},{details:n(()=>[s.value?(r(),c(e(L),{key:0,flow:s.value},null,8,["flow"])):w("",!0)]),deployments:n(()=>[a(e(P),{filter:e(k),prefix:"deployments"},null,8,["filter"])]),runs:n(()=>[a(e(W),{filter:e(b),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected"])]),_:1})}}});export{ne as default};
