import{d as $,v as C,E as i,c as e,R as m,ap as R,S as x,a as s,e as S,w as l,i as U,o as E,m as a,g as o,bH as F,aR as J,bI as _,bJ as T,au as V}from"./index-a91efef8.js";import{u as Y}from"./usePageTitle-6b86fe3b.js";const O=$({__name:"WorkPoolQueue",setup(A){const p=C(),u=i("workPoolName"),v=e(()=>[u.value]),n=i("workPoolQueueName"),d=e(()=>[n.value]),c={interval:3e5},k=m(p.workPoolQueues.getWorkPoolQueueByName,[u.value,n.value],c),t=e(()=>k.response),f=m(p.workPools.getWorkPoolByName,[u.value],c),P=e(()=>f.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!"),g=e(()=>`prefect ${w.value?"agent":"worker"} start --pool ${u.value} --work-queue ${n.value}`),q=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:y}=R({workPoolQueues:{name:d},workPools:{name:v}}),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 Y(N),(r,D)=>{const h=s("p-tabs"),W=s("p-layout-well"),B=s("p-layout-default");return t.value?(E(),S(B,{key:0,class:"work-pool-queue"},{header:l(()=>[a(o(F),{"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(J),{command:g.value,title:b.value,subtitle:q.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(T),{"work-pool-name":o(u),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:l(()=>[a(o(V),{"flow-run-filter":o(y)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])]),_:1})]),_:1})):U("",!0)}}});export{O as default};
