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