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