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