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