import{d as C,u as R,c as l,a as x,U as S,V as A,e as V,r as m,o as a,f as u,w as t,g as e,W as B,h as f,X as w,k as p,Y as N,Z as P,$ as U,t as W,C as z}from"./index.647f6a83.js";import{u as I}from"./useRouteParam.58df0b75.js";import{u as O}from"./useSubscriptionWithDependencies.afeeaa8b.js";const j=C({__name:"Flow",setup(T){const r=I("id"),_=R(),d=l(()=>{const o=["Deployments","Runs"];return z.xl||o.unshift("Details"),o}),y={interval:3e5},v=x(S.getFlow,[r.value],y),s=l(()=>v.response),c=A({flows:[r.value]}),b=l(()=>r.value?[c.value]:null),i=O(U.getDeployments,b),F=l(()=>{var o;return(o=i.response)!=null?o:[]});function D(){_.push(W.flows())}const $=l(()=>s.value?`Flow: ${s.value.name}`:"Flow");return V($),(o,n)=>{const k=m("p-tabs"),g=m("p-layout-well");return a(),u(g,{class:"flow"},{header:t(()=>[e(s)?(a(),u(e(B),{key:0,flow:e(s),onDelete:D},null,8,["flow"])):f("",!0)]),well:t(()=>[e(s)?(a(),u(e(w),{key:0,flow:e(s)},null,8,["flow"])):f("",!0)]),default:t(()=>[p(k,{tabs:e(d)},{details:t(()=>[e(s)?(a(),u(e(w),{key:0,flow:e(s)},null,8,["flow"])):f("",!0)]),deployments:t(()=>[p(e(N),{deployments:e(F),onUpdate:n[0]||(n[0]=h=>e(i).refresh()),onDelete:n[1]||(n[1]=h=>e(i).refresh())},null,8,["deployments"])]),runs:t(()=>[p(e(P),{"flow-run-filter":e(c)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])]),_:1})}}});export{j as default};
