import{d as S,_ as U,W as d,e as o,b as f,by as T,ao as V,bx as j,c as D,f as a,a as H,g as p,aO as I,o as O,j as u,k as e,d4 as Y,cV as A,d5 as v,a6 as F,d6 as Z,bH as z}from"./index-BrFqolpA.js";import{u as E}from"./usePageTitle-CsnULHHx.js";const L=S({__name:"WorkPoolQueue",setup(G){const c=U(),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}=T({workPoolQueues:{name:b},workPools:{name:_}}),W=o(()=>[{label:"Details",hidden:I.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=V("tab","Details"),{tabs:x}=j(W,s),B=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return E(B),(n,m)=>{const C=p("p-tabs"),$=p("p-layout-well"),h=p("p-layout-default");return t.value?(O(),D(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($,{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(C,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=R=>F(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(Z),{"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})):H("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-J2BXJGEn.js.map
