import{d as N,u as P,c as u,a as U,a0 as x,V as T,e as S,N as V,r as p,o as n,f as o,w as a,g as e,a7 as A,h as i,a8 as _,k as m,a9 as B,aa as Q,ab as E,ac as O,Z as W,$ as z,t as I,B as M,C as Z,ad as j}from"./index.c3b9a55d.js";import{u as q}from"./useRouteParam.b592fab0.js";import{u as G}from"./useSubscriptionWithDependencies.3dc092ce.js";import{u as H}from"./useToast.c7b792f2.js";const J=z(" No runs from the last 7 days "),te=N({__name:"Deployment",setup(K){const c=q("id"),y=P(),f=H(),w={interval:3e5},h=u(()=>{var l;const s=["Overview","Runs"];return(l=t.value)!=null&&l.deprecated||s.push("Parameters"),Z.xl||s.push("Details"),s}),r=U(x.getDeployment,[c.value],w),t=u(()=>r.response);function v(){y.push(I.deployments())}const k=T({deployments:[c.value]}),R=u(()=>c.value?[k.value]:null),b=G(M.getFlowRuns,R),d=u(()=>{var s;return(s=b.response)!=null?s:[]}),$=u(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return S($),V(t,()=>{var s,l;!((s=t.value)!=null&&s.workQueueName)&&!((l=t.value)!=null&&l.deprecated)&&f(j.info.deploymentMissingWorkQueue,"default",{timeout:!1})}),(s,l)=>{const g=p("p-content"),D=p("PEmptyResults"),C=p("p-tabs"),F=p("p-layout-well");return n(),o(F,{class:"deployment"},{header:a(()=>[e(t)?(n(),o(e(A),{key:0,deployment:e(t),onUpdate:e(r).refresh,onDelete:v},null,8,["deployment","onUpdate"])):i("",!0)]),well:a(()=>[e(t)?(n(),o(e(_),{key:0,deployment:e(t),alternate:"",onUpdate:e(r).refresh},null,8,["deployment","onUpdate"])):i("",!0)]),default:a(()=>[e(t)?(n(),o(C,{key:0,tabs:e(h)},{overview:a(()=>[m(g,{secondary:""},{default:a(()=>[e(t).deprecated?(n(),o(e(B),{key:0})):e(t).description?(n(),o(e(Q),{key:1,description:e(t).description},null,8,["description"])):(n(),o(e(E),{key:2,deployment:e(t)},null,8,["deployment"]))]),_:1})]),parameters:a(()=>[m(e(O),{deployment:e(t)},null,8,["deployment"])]),details:a(()=>[m(e(_),{deployment:e(t),onUpdate:e(r).refresh},null,8,["deployment","onUpdate"])]),runs:a(()=>[e(d).length?(n(),o(e(W),{key:0,"flow-runs":e(d),disabled:"",selected:[]},null,8,["flow-runs"])):(n(),o(D,{key:1},{message:a(()=>[J]),_:1}))]),_:1},8,["tabs"])):i("",!0)]),_:1})}}});export{te as default};
