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