import{d as R,b as U,W as d,e as o,t as f,ap as D,Q as S,ao as Y,c as j,g as a,a as M,h as p,T as V,o as A,n as u,j as e,c9 as F,bj as L,ca as v,y as O,cb as z,aB as E}from"./index-CPxpbp4R.js";import{u as G}from"./usePageTitle-CcH2lmI6.js";const K=R({__name:"WorkPoolQueue",setup(H){const c=U(),l=d("workPoolName"),b=o(()=>[l.value]),r=d("workPoolQueueName"),_=o(()=>[r.value]),k={interval:3e5},w=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>w.response),P=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>P.response),i=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!"),Q=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:N}=D({workPoolQueues:{name:_},workPools:{name:b}}),W=o(()=>[{label:"Details",hidden:V.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=S("tab","Details"),{tabs:B}=Y(W,s),h=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return G(h),(n,m)=>{const x=p("p-tabs"),C=p("p-layout-well"),T=p("p-layout-default");return t.value?(A(),j(T,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(F),{"work-pool-queue":t.value,"work-pool-name":e(l),onUpdate:e(w).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[u(C,{class:"work-pool-queue__body"},{header:a(()=>[u(e(L),{command:Q.value,title:g.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(x,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=$=>O(s)?s.value=$: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(E),{filter:e(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):M("",!0)}}});export{K as default};
//# sourceMappingURL=WorkPoolQueue-DxT2D19w.js.map
