import{d as T,g as U,W as d,i as o,h as f,bu as V,aI as D,al as I,bt as S,j as p,c as F,a as Y,o as Z,k as a,l as u,p as e,a6 as j,bz as z,d9 as A,da as v,d1 as O,db as E}from"./index-Cixz26l0.js";import{u as G}from"./usePageTitle-BPkBun_K.js";const L=T({__name:"WorkPoolQueue",setup(H){const c=U(),l=d("workPoolName"),b=o(()=>[l.value]),r=d("workPoolQueueName"),_=o(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>i.response),P=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>P.response),w=o(()=>{var n;return((n=q.value)==null?void 0:n.type)==="prefect-agent"}),g=o(()=>t.value?`Your work pool ${t.value.name} is ready to go!`:"Your work queue is ready to go!"),y=o(()=>`prefect ${w.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),Q=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:N}=V({workPoolQueues:{name:_},workPools:{name:b}}),W=o(()=>[{label:"Details",hidden:D.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=I("tab","Details"),{tabs:B}=S(W,s),C=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return G(C),(n,m)=>{const h=p("p-tabs"),x=p("p-layout-well"),$=p("p-layout-default");return t.value?(Z(),F($,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(E),{"work-pool-queue":t.value,"work-pool-name":e(l),onUpdate:e(i).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[u(x,{class:"work-pool-queue__body"},{header:a(()=>[u(e(O),{command:y.value,title:g.value,subtitle:Q.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(h,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=R=>j(s)?s.value=R: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(A),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(z),{filter:e(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):Y("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-B_Oe4K00.js.map
