import{d as U,e as D,W as d,g as o,f,bu as I,al as S,bt as T,c as j,h as a,a as V,i as p,aL as Y,o as A,j as u,k as e,da as F,c$ as J,db as v,a6 as L,dc as O,bD as Z}from"./index-B5elPXvm.js";import{u as z}from"./usePageTitle-c6xxeh_y.js";const K=U({__name:"WorkPoolQueue",setup(E){const c=D(),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),g=o(()=>P.response),w=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!"),Q=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:N}=I({workPoolQueues:{name:_},workPools:{name:b}}),W=o(()=>[{label:"Details",hidden:Y.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=S("tab","Details"),{tabs:x}=T(W,s),B=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return z(B),(n,m)=>{const $=p("p-tabs"),h=p("p-layout-well"),C=p("p-layout-default");return t.value?(A(),j(C,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(F),{"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(h,{class:"work-pool-queue__body"},{header:a(()=>[u(e(J),{command:Q.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($,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=R=>L(s)?s.value=R:null),tabs:e(x)},{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(O),{"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})):V("",!0)}}});export{K as default};
//# sourceMappingURL=WorkPoolQueue-bWwXQFzJ.js.map
