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