import{d as A,W as B,f as u,aF as O,t as V,an as q,bv as E,bw as y,b_ as W,c,g as l,a as _,h as s,u as $,aO as j,b$ as G,o as p,j as n,k as e,c0 as M,c1 as b,c2 as Q,c3 as z,c4 as H,c5 as J,c6 as K,x as L,A as X,c7 as Y,F as Z,bG as v,a5 as ee,bo as te}from"./index-BqDjVCF_.js";import{u as ne}from"./usePageTitle-CZh_IXm2.js";const se=A({__name:"Deployment",setup(le){const m=B("deploymentId"),i=u(()=>[m.value]),g=$(),h=O(),w={interval:3e5},d=V(h.deployments.getDeployment,[m.value],w),t=u(()=>d.response),x=u(()=>{var o,a;return[{label:"Details",hidden:j.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=q("tab","Details"),{tabs:R}=E(x,r);function k(){g.push(te.deployments())}const{filter:D}=y({deployments:{id:i},flowRuns:{state:{name:G.filter(o=>o!=="Scheduled")}}}),{filter:U}=y({sort:"START_TIME_ASC",deployments:{id:i},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:f}=W(()=>({deployments:{id:i.value}})),F=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(F),(o,a)=>{const T=s("p-content"),C=s("p-heading"),S=s("p-divider"),I=s("p-tabs"),N=s("p-layout-well");return t.value?(p(),c(N,{key:0,class:"deployment"},{header:l(()=>[n(e(M),{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]=P=>ee(r)?r.value=P:null),tabs:e(R)},{description:l(()=>[n(T,{secondary:""},{default:l(()=>[t.value.deprecated?(p(),c(e(Q),{key:0})):t.value.description?(p(),c(e(z),{key:1,description:t.value.description},null,8,["description"])):(p(),c(e(H),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(J),{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(d).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(f)?(p(),L(Z,{key:0},[n(C,{heading:"6",class:"workspace-deployment__next-run"},{default:l(()=>[X(" Next Run ")]),_:1}),n(e(Y),{"flow-run":e(f)},null,8,["flow-run"]),n(S)],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-CKm5JmkL.js.map
