import{a as W,x as B,b as i,c as e,$ as m,al as C,D,u as o,f as R,w as u,h as S,g as s,o as U,j as t,bF as F,aO as O,bG as _,bH as T,aq as V}from"./index-e7fdb3d4.js";import{u as Y}from"./usePageTitle-df55e3a5.js";const M=W({__name:"WorkPoolQueue",setup(j){const p=B(),l=i("workPoolName"),f=e(()=>[l.value]),n=i("workPoolQueueName"),d=e(()=>[n.value]),c={interval:3e5},k=m(p.workPoolQueues.getWorkPoolQueueByName,[l.value,n.value],c),a=e(()=>k.response),P=m(p.workPools.getWorkPoolByName,[l.value],c),v=e(()=>P.response),w=e(()=>{var r;return((r=v.value)==null?void 0:r.type)==="prefect-agent"}),b=e(()=>a.value?`Your work pool ${a.value.name} is ready to go!`:"Your work queue is ready to go!"),q=e(()=>`prefect ${w.value?"agent":"worker"} start --pool ${l.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:y}=C({workPoolQueues:{name:d},workPools:{name:f}}),Q=e(()=>{const r=["Upcoming Runs","Runs"];return D.xl||r.unshift("Details"),r}),N=e(()=>n.value?`Work Pool Queue: ${n.value}`:"Work Pool Queue");return Y(N),(r,A)=>{const x=s("p-tabs"),$=s("p-layout-well"),h=s("p-layout-default");return o(a)?(U(),R(h,{key:0,class:"work-pool-queue"},{header:u(()=>[t(o(F),{"work-pool-queue":o(a),"work-pool-name":o(l),onUpdate:o(k).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:u(()=>[t($,{class:"work-pool-queue__body"},{header:u(()=>[t(o(O),{command:o(q),title:o(b),subtitle:o(g)},null,8,["command","title","subtitle"])]),well:u(()=>[t(o(_),{alternate:"","work-pool-name":o(l),"work-pool-queue":o(a)},null,8,["work-pool-name","work-pool-queue"])]),default:u(()=>[t(x,{tabs:o(Q)},{details:u(()=>[t(o(_),{"work-pool-name":o(l),"work-pool-queue":o(a)},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":u(()=>[t(o(T),{"work-pool-name":o(l),"work-pool-queue":o(a)},null,8,["work-pool-name","work-pool-queue"])]),runs:u(()=>[t(o(V),{"flow-run-filter":o(y)},null,8,["flow-run-filter"])]),_:1},8,["tabs"])]),_:1})]),_:1})):S("",!0)}}});export{M as default};
