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