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