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