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