import{d as V,v as $,g as u,u as j,S as q,j as A,aJ as E,al as O,bv as P,bw as f,bZ as z,h as o,c as r,a as v,o as a,i as l,k as n,m as e,a6 as J,bB as _,n as M,F as Z,B as G,b_ as H,b$ as b,c0 as K,c1 as L,c2 as Q,c3 as W,c4 as X,c5 as Y,bg as ee,c6 as te}from"./index-CWv_Pcr2.js";import{u as ne}from"./usePageTitle-DY9DP8zZ.js";const se=V({__name:"Deployment",setup(le){const i=$("deploymentId"),c=u(()=>[i.value]),g=j(),w=q(),h={interval:3e5},s=A(w.deployments.getDeployment,[i.value],h),t=u(()=>s.response),R=u(()=>[{label:"Details",hidden:E.xl},{label:"Runs"},{label:"Upcoming"},{label:"Parameters",hidden:t.value?.deprecated},{label:"Configuration",hidden:t.value?.deprecated},{label:"Description"}]),p=O("tab","Details"),{tabs:x}=P(R,p);function D(){g.push(ee.deployments())}const{filter:k}=f({deployments:{id:c},flowRuns:{state:{name:te.filter(y=>y!=="Scheduled")}}}),{filter:U}=f({sort:"START_TIME_ASC",deployments:{id:c},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:m}=z(()=>({deployments:{id:c.value}})),S=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(S),(y,d)=>{const T=o("p-content"),C=o("p-heading"),B=o("p-divider"),F=o("p-tabs"),N=o("p-layout-well");return t.value?(a(),r(N,{key:0,class:"deployment"},{header:l(()=>[n(e(Y),{deployment:t.value,onUpdate:e(s).refresh,onDelete:D},null,8,["deployment","onUpdate"])]),well:l(()=>[n(e(b),{deployment:t.value,alternate:"",onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),default:l(()=>[n(F,{selected:e(p),"onUpdate:selected":d[0]||(d[0]=I=>J(p)?p.value=I:null),tabs:e(x)},{description:l(()=>[n(T,{secondary:""},{default:l(()=>[t.value.deprecated?(a(),r(e(Q),{key:0})):t.value.description?(a(),r(e(W),{key:1,description:t.value.description},null,8,["description"])):(a(),r(e(X),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(L),{deployment:t.value},null,8,["deployment"])]),configuration:l(()=>[n(e(K),{deployment:t.value},null,8,["deployment"])]),details:l(()=>[n(e(b),{deployment:t.value,onUpdate:e(s).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(m)?(a(),M(Z,{key:0},[n(C,{heading:"6",class:"deployment__next-run"},{default:l(()=>[...d[1]||(d[1]=[G(" Next Run ",-1)])]),_:1}),n(e(H),{"flow-run":e(m)},null,8,["flow-run"]),n(B)],64)):v("",!0),n(e(_),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:l(()=>[n(e(_),{filter:e(U),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):v("",!0)}}});export{se as default};
//# sourceMappingURL=Deployment-CuiAbrIq.js.map
