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