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