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