import{d as S,S as U,v as m,g as o,j as d,bw as R,aJ as D,al as F,bv as T,h as n,c as j,a as A,o as O,i as a,k as u,m as e,a6 as V,bB as Y,d7 as z,d8 as v,c$ as J,d9 as E}from"./index-CWv_Pcr2.js";import{u as G}from"./usePageTitle-DY9DP8zZ.js";const M=S({__name:"WorkPoolQueue",setup(H){const p=U(),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),w=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 ${w.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),y=o(()=>`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}=R({workPoolQueues:{name:_},workPools:{name:f}}),N=o(()=>[{label:"Details",hidden:D.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=F("tab","Details"),{tabs:B}=T(N,s),h=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return G(h),(I,i)=>{const W=n("p-tabs"),$=n("p-layout-well"),C=n("p-layout-default");return t.value?(O(),j(C,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(E),{"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(J),{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":i[0]||(i[0]=x=>V(s)?s.value=x: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(z),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(Y),{filter:e(Q),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):A("",!0)}}});export{M as default};
//# sourceMappingURL=WorkPoolQueue-wphPINA4.js.map
