import{d as T,al as U,W as d,b as o,t as f,b6 as S,am as D,b5 as O,c as V,e as a,a as Y,f as p,ar as Z,o as A,g as t,h as e,cP as E,bZ as F,cQ as v,a5 as H,cR as I,bh as j}from"./index-BjFilUfY.js";import{u as z}from"./usePageTitle-J4-vayug.js";const L=T({__name:"WorkPoolQueue",setup(G){const c=U(),l=d("workPoolName"),P=o(()=>[l.value]),r=d("workPoolQueueName"),b=o(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),u=o(()=>i.response),_=f(c.workPools.getWorkPoolByName,[l.value],k),q=o(()=>_.response),w=o(()=>{var n;return((n=q.value)==null?void 0:n.type)==="prefect-agent"}),g=o(()=>u.value?`Your work pool ${u.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}=S({workPoolQueues:{name:b},workPools:{name:P}}),W=o(()=>[{label:"Details",hidden:Z.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=D("tab","Details"),{tabs:h}=O(W,s),B=o(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return z(B),(n,m)=>{const C=p("p-tabs"),x=p("p-layout-well"),R=p("p-layout-default");return u.value?(A(),V(R,{key:0,class:"work-pool-queue"},{header:a(()=>[t(e(E),{"work-pool-queue":u.value,"work-pool-name":e(l),onUpdate:e(i).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[t(x,{class:"work-pool-queue__body"},{header:a(()=>[t(e(F),{command:Q.value,title:g.value,subtitle:y.value},null,8,["command","title","subtitle"])]),well:a(()=>[t(e(v),{alternate:"","work-pool-name":e(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),default:a(()=>[t(C,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=$=>H(s)?s.value=$:null),tabs:e(h)},{details:a(()=>[t(e(v),{"work-pool-name":e(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":a(()=>[t(e(I),{"work-pool-name":e(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[t(e(j),{filter:e(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):Y("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-BffGGzqf.js.map
