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