import{d as U,a as S,M as d,c as o,E as _,aG as T,j as V,R as Y,ah as A,b as p,e as D,w as a,f as E,o as M,h as u,u as e,bX as Z,b6 as j,bY as v,s as F,bZ as G,aL as L}from"./index-562c8470.js";import{u as O}from"./usePageTitle-ad3dbf10.js";const I=U({__name:"WorkPoolQueue",setup(X){const c=S(),l=d("workPoolName"),f=o(()=>[l.value]),r=d("workPoolQueueName"),b=o(()=>[r.value]),k={interval:3e5},w=_(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>w.response),P=_(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:f}}),W=o(()=>[{label:"Details",hidden:V.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=Y("tab","Details"),{tabs:h}=A(W,s),x=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return O(x),(n,m)=>{const B=p("p-tabs"),C=p("p-layout-well"),R=p("p-layout-default");return t.value?(M(),D(R,{key:0,class:"work-pool-queue"},{header:a(()=>[u(e(Z),{"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(j),{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(B,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=$=>F(s)?s.value=$:null),tabs:e(h)},{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(G),{"work-pool-name":e(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(e(L),{"flow-run-filter":e(N)},null,8,["flow-run-filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):E("",!0)}}});export{I as default};
