import{a as C,b as I,c as r,x as R,$,D as B,T as S,al as j,_ as M,f as s,w as o,g as u,B as P,o as a,u as e,at as Q,h as i,au as y,j as p,av as V,aw as q,ax as E,ay as F,aa as G,aq as J,X as W,e as X}from"./index-e7fdb3d4.js";import{u as z}from"./useToast-1dd179fb.js";import{u as A}from"./usePageTitle-df55e3a5.js";const Z=C({__name:"Deployment",setup(H){const c=I("deploymentId"),_=r(()=>[c.value]),f=P(),v=R(),h=z(),b={interval:3e5},d=$(v.deployments.getDeployment,[c.value],b),t=r(()=>d.response),k=r(()=>{var n,l;return[{label:"Details",hidden:B.xl},{label:"Runs"},{label:"Parameters",hidden:(n=t.value)==null?void 0:n.deprecated},{label:"Infra Overrides",hidden:(l=t.value)==null?void 0:l.deprecated},{label:"Description"}]}),{tabs:x}=S(k);function g(){f.push(W.deployments())}const m=r(()=>{var n;return(n=t.value)!=null&&n.infrastructureOverrides?JSON.stringify(t.value.infrastructureOverrides,void 0,2):"{}"}),{filter:w}=j({deployments:{id:_}}),D=r(()=>t.value?`Deployment: ${t.value.name}`:"Deployment");return A(D),M(t,()=>{var n,l;!((n=t.value)!=null&&n.workQueueName)&&!((l=t.value)!=null&&l.deprecated)&&h(X.info.deploymentMissingWorkQueue,"default",{timeout:!1})}),(n,l)=>{const T=u("p-content"),U=u("p-code-highlight"),N=u("p-tabs"),O=u("p-layout-well");return a(),s(O,{class:"deployment"},{header:o(()=>[e(t)?(a(),s(e(Q),{key:0,deployment:e(t),onUpdate:e(d).refresh,onDelete:g},null,8,["deployment","onUpdate"])):i("",!0)]),well:o(()=>[e(t)?(a(),s(e(y),{key:0,deployment:e(t),alternate:"",onUpdate:e(d).refresh},null,8,["deployment","onUpdate"])):i("",!0)]),default:o(()=>[e(t)?(a(),s(N,{key:0,tabs:e(x)},{description:o(()=>[p(T,{secondary:""},{default:o(()=>[e(t).deprecated?(a(),s(e(V),{key:0})):e(t).description?(a(),s(e(q),{key:1,description:e(t).description},null,8,["description"])):(a(),s(e(E),{key:2,deployment:e(t)},null,8,["deployment"]))]),_:1})]),parameters:o(()=>[p(e(F),{deployment:e(t)},null,8,["deployment"])]),"infra-overrides":o(()=>[e(t)?(a(),s(e(G),{key:0,"text-to-copy":e(m)},{default:o(()=>[p(U,{lang:"json",text:e(m),class:"deployment__infra-overrides"},null,8,["text"])]),_:1},8,["text-to-copy"])):i("",!0)]),details:o(()=>[p(e(y),{deployment:e(t),onUpdate:e(d).refresh},null,8,["deployment","onUpdate"])]),runs:o(()=>[p(e(J),{"flow-run-filter":e(w)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])):i("",!0)]),_:1})}}});export{Z as default};
