import{d as V,W,e as u,b as j,t as A,Q as E,ao as O,ap as f,aV as P,c,g as l,a as _,h as s,a1 as Q,T as $,aW as J,o as d,n,j as e,aX as L,aY as b,aZ as M,a_ as X,a$ as Y,b0 as Z,b1 as q,l as z,v as G,b2 as H,F as K,aB as v,y as ee,ae as te}from"./index-CPxpbp4R.js";import{u as ne}from"./usePageTitle-CcH2lmI6.js";const se=V({__name:"Deployment",setup(le){const m=W("deploymentId"),i=u(()=>[m.value]),g=Q(),h=j(),w={interval:3e5},p=A(h.deployments.getDeployment,[m.value],w),t=u(()=>p.response),R=u(()=>{var a,o;return[{label:"Details",hidden:$.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:T}=O(R,r);function k(){g.push(te.deployments())}const{filter:x}=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}=P(()=>({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"),N=s("p-divider"),S=s("p-tabs"),B=s("p-layout-well");return t.value?(d(),c(B,{key:0,class:"deployment"},{header:l(()=>[n(e(L),{deployment:t.value,onUpdate:e(p).refresh,onDelete:k},null,8,["deployment","onUpdate"])]),well:l(()=>[n(e(b),{deployment:t.value,alternate:"",onUpdate:e(p).refresh},null,8,["deployment","onUpdate"])]),default:l(()=>[n(S,{selected:e(r),"onUpdate:selected":o[0]||(o[0]=I=>ee(r)?r.value=I:null),tabs:e(T)},{description:l(()=>[n(C,{secondary:""},{default:l(()=>[t.value.deprecated?(d(),c(e(M),{key:0})):t.value.description?(d(),c(e(X),{key:1,description:t.value.description},null,8,["description"])):(d(),c(e(Y),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(Z),{deployment:t.value},null,8,["deployment"])]),configuration:l(()=>[n(e(q),{deployment:t.value},null,8,["deployment"])]),details:l(()=>[n(e(b),{deployment:t.value,onUpdate:e(p).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(y)?(d(),z(K,{key:0},[n(F,{heading:"6",class:"workspace-deployment__next-run"},{default:l(()=>[G(" Next Run ")]),_:1}),n(e(H),{"flow-run":e(y)},null,8,["flow-run"]),n(N)],64)):_("",!0),n(e(v),{filter:e(x),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:l(()=>[n(e(v),{filter:e(D),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):_("",!0)}}});export{se as default};
//# sourceMappingURL=Deployment-CGTsB672.js.map
