import{d as x,S as R,v as m,g as o,j as d,bw as U,aJ as D,al as F,bv as T,h as n,c as j,a as V,o as Y,i as a,k as u,m as e,a6 as z,bB as A,d7 as J,d8 as v,c$ as M,d9 as O}from"./index-BRrm8IYN.js";import{u as E}from"./usePageTitle-D8ThwtpL.js";const L=x({__name:"WorkPoolQueue",setup(G){const p=R(),l=m("workPoolName"),f=o(()=>[l.value]),r=m("workPoolQueueName"),_=o(()=>[r.value]),c={interval:3e5},k=d(p.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],c),t=o(()=>k.response),b=d(p.workPools.getWorkPoolByName,[l.value],c),P=o(()=>b.response),i=o(()=>P.value?.type==="prefect-agent"),q=o(()=>t.value?`Your work pool ${t.value.name} is ready to go!`:"Your work queue is ready to go!"),g=o(()=>`prefect ${i.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),y=o(()=>`Work queues are scoped to a work pool to allow ${i.value?"agents":"workers"} to pull from groups of queues with different priorities.`),{filter:Q}=U({workPoolQueues:{name:_},workPools:{name:f}}),B=o(()=>[{label:"Details",hidden:D.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=F("tab","Details"),{tabs:N}=T(B,s),h=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return E(h),(H,w)=>{const W=n("p-tabs"),$=n("p-layout-well"),C=n("p-layout-default");return t.value?(Y(),j(C,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(O),{"work-pool-queue":t.value,"work-pool-name":e(l),onUpdate:e(k).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[u($,{class:"work-pool-queue__body"},{header:a(()=>[u(e(M),{command:g.value,title:q.value,subtitle:y.value},null,8,["command","title","subtitle"])]),well:a(()=>[u(e(v),{alternate:"","work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),default:a(()=>[u(W,{selected:e(s),"onUpdate:selected":w[0]||(w[0]=S=>z(s)?s.value=S:null),tabs:e(N)},{details:a(()=>[u(e(v),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":a(()=>[u(e(J),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(A),{filter:e(Q),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):V("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-CrhLOB9z.js.map
