import{d as N,W as H,b as u,al as V,t as A,am as M,b5 as O,b6 as f,bB as P,c,e as l,a as _,f as s,u as W,ar as G,bC as J,o as p,g as n,h as e,bD as K,bE as b,bF as Q,bG as X,bH as $,bI as j,bJ as q,p as z,x as L,bK as Y,F as Z,bh as v,a5 as ee,aX as te}from"./index-BjFilUfY.js";import{u as ne}from"./usePageTitle-J4-vayug.js";const se=N({__name:"Deployment",setup(le){const m=H("deploymentId"),i=u(()=>[m.value]),h=W(),g=V(),w={interval:3e5},d=A(g.deployments.getDeployment,[m.value],w),t=u(()=>d.response),x=u(()=>{var o,a;return[{label:"Details",hidden:G.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"}]}),r=M("tab","Details"),{tabs:R}=O(x,r);function D(){h.push(te.deployments())}const{filter:k}=f({deployments:{id:i},flowRuns:{state:{name:J.filter(o=>o!=="Scheduled")}}}),{filter:C}=f({sort:"START_TIME_ASC",deployments:{id:i},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:y}=P(()=>({deployments:{id:i.value}})),T=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(T),(o,a)=>{const U=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(K),{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":a[0]||(a[0]=E=>ee(r)?r.value=E:null),tabs:e(R)},{description:l(()=>[n(U,{secondary:""},{default:l(()=>[t.value.deprecated?(p(),c(e(Q),{key:0})):t.value.description?(p(),c(e(X),{key:1,description:t.value.description},null,8,["description"])):(p(),c(e($),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:l(()=>[n(e(j),{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(d).refresh},null,8,["deployment","onUpdate"])]),runs:l(()=>[e(y)?(p(),z(Z,{key:0},[n(F,{heading:"6",class:"workspace-deployment__next-run"},{default:l(()=>[L(" Next Run ")]),_:1}),n(e(Y),{"flow-run":e(y)},null,8,["flow-run"]),n(I)],64)):_("",!0),n(e(v),{filter:e(k),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:l(()=>[n(e(v),{filter:e(C),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):_("",!0)}}});export{se as default};
//# sourceMappingURL=Deployment-D5NnVskH.js.map
