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