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