import{d as $,u as h,b as C,f as c,Y as g,e as u,M as x,h as d,o as p,i as l,w as a,j as e,a7 as A,k as _,p as y,a8 as I,Q as S,A as U}from"./index.4f49b599.js";const R=$({__name:"WorkQueue",setup(B){const f=h(),k=C("id"),m={interval:3e5},i=c(g.getWorkQueue,[k.value],m),o=u(()=>i.response),w=u(()=>{var t,s,n;return(n=(s=(t=o==null?void 0:o.value)==null?void 0:t.filter)==null?void 0:s.deploymentIds)!=null?n:[]}),Q=u(()=>({deployments:{id:{any_:w.value}}})),r=c(x.getDeployments,[Q],m),D=u(()=>{var t;return(t=r.response)!=null?t:[]}),b=()=>{f.push(U.workQueues())};return(t,s)=>{const n=d("p-tabs"),v=d("p-layout-default");return p(),l(v,{class:"queue"},{header:a(()=>[e(o)?(p(),l(e(A),{key:0,queue:e(o),onUpdate:e(i).refresh,onDelete:b},null,8,["queue","onUpdate"])):_("",!0)]),default:a(()=>[y(n,{tabs:["Details","Deployments"]},{details:a(()=>[e(o)?(p(),l(e(I),{key:0,"work-queue":e(o)},null,8,["work-queue"])):_("",!0)]),deployments:a(()=>[y(e(S),{deployments:e(D),onUpdate:s[0]||(s[0]=q=>e(r).refresh()),onDelete:s[1]||(s[1]=q=>e(r).refresh())},null,8,["deployments"])]),_:1})]),_:1})}}});export{R as default};
