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