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