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