import{d as N,U as V,h as r,_ as A,M as O,f as q,q as E,I as P,am as $,ao as f,aS as J,k as s,c as i,l as a,a as _,aT as K,o as p,n,u as e,aU as W,aV as v,aW as X,aX as Y,aY as Z,aZ as j,a_ as z,m as G,t as H,a$ as L,B as Q,ax as b,A as ee,af as te}from"./index-gULJbqdd.js";import{u as ne}from"./usePageTitle-HrbxxOEb.js";const se=N({__name:"Deployment",setup(ae){const m=V("deploymentId"),c=r(()=>[m.value]),g=A(),h=O(),w={interval:3e5},d=q(h.deployments.getDeployment,[m.value],w),t=r(()=>d.response),R=r(()=>{var l,o;return[{label:"Details",hidden:E.xl},{label:"Runs"},{label:"Upcoming"},{label:"Parameters",hidden:(l=t.value)==null?void 0:l.deprecated},{label:"Configuration",hidden:(o=t.value)==null?void 0:o.deprecated},{label:"Description"}]}),u=P("tab","Details"),{tabs:U}=$(R,u);function k(){g.push(te.deployments())}const{filter:x}=f({deployments:{id:c},flowRuns:{state:{name:K.filter(l=>l!=="Scheduled")}}}),{filter:T}=f({sort:"START_TIME_ASC",deployments:{id:c},flowRuns:{state:{name:["Scheduled"]}}}),{flowRun:y}=J(()=>({deployments:{id:c.value}})),D=r(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return ne(D),(l,o)=>{const S=s("p-content"),C=s("p-heading"),I=s("p-divider"),B=s("p-tabs"),F=s("p-layout-well");return t.value?(p(),i(F,{key:0,class:"deployment"},{header:a(()=>[n(e(W),{deployment:t.value,onUpdate:e(d).refresh,onDelete:k},null,8,["deployment","onUpdate"])]),well:a(()=>[n(e(v),{deployment:t.value,alternate:"",onUpdate:e(d).refresh},null,8,["deployment","onUpdate"])]),default:a(()=>[n(B,{selected:e(u),"onUpdate:selected":o[0]||(o[0]=M=>ee(u)?u.value=M:null),tabs:e(U)},{description:a(()=>[n(S,{secondary:""},{default:a(()=>[t.value.deprecated?(p(),i(e(X),{key:0})):t.value.description?(p(),i(e(Y),{key:1,description:t.value.description},null,8,["description"])):(p(),i(e(Z),{key:2,deployment:t.value},null,8,["deployment"]))]),_:1})]),parameters:a(()=>[n(e(j),{deployment:t.value},null,8,["deployment"])]),configuration:a(()=>[n(e(z),{deployment:t.value},null,8,["deployment"])]),details:a(()=>[n(e(v),{deployment:t.value,onUpdate:e(d).refresh},null,8,["deployment","onUpdate"])]),runs:a(()=>[e(y)?(p(),G(Q,{key:0},[n(C,{heading:"6",class:"workspace-deployment__next-run"},{default:a(()=>[H(" Next Run ")]),_:1}),n(e(L),{"flow-run":e(y)},null,8,["flow-run"]),n(I)],64)):_("",!0),n(e(b),{filter:e(x),selectable:"",prefix:"runs"},null,8,["filter"])]),upcoming:a(()=>[n(e(b),{filter:e(T),selectable:"",prefix:"upcoming"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})):_("",!0)}}});export{se as default};
