import{d as O,W as P,i as r,f as V,t as W,ao as $,bx as A,by as f,b$ as E,c,j as l,a as _,k as s,h as G,aO as M,c0 as j,o as p,l as n,m as e,c1 as z,c2 as b,c3 as H,c4 as L,c5 as Q,c6 as X,c7 as q,z as J,C as K,c8 as Y,F as Z,bH as v,a6 as ee,bo as te}from"./index-CcVNxLw9.js";import{u as ne}from"./usePageTitle-B0-KYjWV.js";const se=O({__name:"Deployment",setup(le){const m=P("deploymentId"),i=r(()=>[m.value]),h=G(),x=V(),g={interval:3e5},d=W(x.deployments.getDeployment,[m.value],g),t=r(()=>d.response),w=r(()=>{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"}]}),u=$("tab","Details"),{tabs:R}=A(w,u);function k(){h.push(te.deployments())}const{filter:D}=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}=E(()=>({deployments:{id:i.value}})),C=r(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(C),(o,a)=>{const T=s("p-content"),N=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(z),{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(F,{selected:e(u),"onUpdate:selected":a[0]||(a[0]=B=>ee(u)?u.value=B:null),tabs:e(R)},{description:l(()=>[n(T,{secondary:""},{default:l(()=>[t.value.deprecated?(p(),c(e(H),{key:0})):t.value.description?(p(),c(e(L),{key:1,description:t.value.description},null,8,["description"])):(p(),c(e(Q),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(X),{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(),J(Z,{key:0},[n(N,{heading:"6",class:"deployment__next-run"},{default:l(()=>[K(" Next Run ")]),_:1}),n(e(Y),{"flow-run":e(y)},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-ue4IoZ0i.js.map
