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