import{d as R,m as C,E as i,c as e,R as m,ap as $,S as x,a as s,f as S,w as l,h as E,o as U,n as a,g as o,bH as T,aR as V,bI as _,bJ as Y,au as j}from"./index-18beffd6.js";import{u as A}from"./usePageTitle-5c97edcb.js";const J=R({__name:"WorkPoolQueue",setup(D){const p=C(),u=i("workPoolName"),f=e(()=>[u.value]),n=i("workPoolQueueName"),v=e(()=>[n.value]),c={interval:3e5},k=m(p.workPoolQueues.getWorkPoolQueueByName,[u.value,n.value],c),t=e(()=>k.response),d=m(p.workPools.getWorkPoolByName,[u.value],c),P=e(()=>d.response),w=e(()=>{var r;return((r=P.value)==null?void 0:r.type)==="prefect-agent"}),b=e(()=>t.value?`Your work pool ${t.value.name} is ready to go!`:"Your work queue is ready to go!"),y=e(()=>`prefect ${w.value?"agent":"worker"} start --pool ${u.value} --work-queue ${n.value}`),g=e(()=>`Work queues are scoped to a work pool to allow ${w.value?"agents":"workers"} to pull from groups of queues with different priorities.`),{filter:q}=$({workPoolQueues:{name:v},workPools:{name:f}}),Q=e(()=>{const r=["Upcoming Runs","Runs"];return x.xl||r.unshift("Details"),r}),N=e(()=>n.value?`Work Pool Queue: ${n.value}`:"Work Pool Queue");return A(N),(r,F)=>{const h=s("p-tabs"),W=s("p-layout-well"),B=s("p-layout-default");return t.value?(U(),S(B,{key:0,class:"work-pool-queue"},{header:l(()=>[a(o(T),{"work-pool-queue":t.value,"work-pool-name":o(u),onUpdate:o(k).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:l(()=>[a(W,{class:"work-pool-queue__body"},{header:l(()=>[a(o(V),{command:y.value,title:b.value,subtitle:g.value},null,8,["command","title","subtitle"])]),well:l(()=>[a(o(_),{alternate:"","work-pool-name":o(u),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),default:l(()=>[a(h,{tabs:Q.value},{details:l(()=>[a(o(_),{"work-pool-name":o(u),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":l(()=>[a(o(Y),{"work-pool-name":o(u),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:l(()=>[a(o(j),{"flow-run-filter":o(q)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])]),_:1})]),_:1})):E("",!0)}}});export{J as default};
