import{d as R,M as T,U as d,h as o,f,ao as I,q as M,I as S,am as A,k as p,c as D,l as a,a as V,o as Y,n as u,u as e,c5 as F,bf as G,c6 as v,A as O,c7 as j,ax as z}from"./index-gULJbqdd.js";import{u as E}from"./usePageTitle-HrbxxOEb.js";const L=R({__name:"WorkPoolQueue",setup(H){const c=T(),l=d("workPoolName"),_=o(()=>[l.value]),r=d("workPoolQueueName"),P=o(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=o(()=>i.response),b=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>b.response),w=o(()=>{var n;return((n=q.value)==null?void 0:n.type)==="prefect-agent"}),g=o(()=>t.value?`Your work pool ${t.value.name} is ready to go!`:"Your work queue is ready to go!"),y=o(()=>`prefect ${w.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),Q=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:P},workPools:{name:_}}),B=o(()=>[{label:"Details",hidden:M.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=S("tab","Details"),{tabs:W}=A(B,s),h=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return E(h),(n,m)=>{const x=p("p-tabs"),C=p("p-layout-well"),U=p("p-layout-default");return t.value?(Y(),D(U,{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(C,{class:"work-pool-queue__body"},{header:a(()=>[u(e(G),{command:y.value,title:g.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]=$=>O(s)?s.value=$:null),tabs:e(W)},{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(j),{"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{L as default};
