import{d as S,S as F,v as m,f as o,j as d,bw as R,aJ as U,al as D,bv as T,g as n,c as V,a as j,o as Y,h as a,i 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-B8dvxl4J.js";import{u as Z}from"./usePageTitle-BP6ee6do.js";const K=S({__name:"WorkPoolQueue",setup(E){const p=F(),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}=R({workPoolQueues:{name:_},workPools:{name:f}}),N=o(()=>[{label:"Details",hidden:U.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=D("tab","Details"),{tabs:B}=T(N,s),h=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return Z(h),(G,w)=>{const W=n("p-tabs"),$=n("p-layout-well"),x=n("p-layout-default");return t.value?(Y(),V(x,{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]=C=>z(s)?s.value=C:null),tabs:e(B)},{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})):j("",!0)}}});export{K as default};
//# sourceMappingURL=WorkPoolQueue-1QjEc7Xp.js.map
