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