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