import{d as U,aF as A,W as d,f as o,t as f,bw as F,an as O,bv as S,c as T,g as a,a as D,h as p,aO as V,o as Y,j as t,k as e,dd as j,cn as G,de as v,a5 as I,df as M,bG as z}from"./index-BqDjVCF_.js";import{u as E}from"./usePageTitle-CZh_IXm2.js";const L=U({__name:"WorkPoolQueue",setup(H){const c=A(),l=d("workPoolName"),P=o(()=>[l.value]),r=d("workPoolQueueName"),_=o(()=>[r.value]),k={interval:3e5},w=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),u=o(()=>w.response),b=f(c.workPools.getWorkPoolByName,[l.value],k),g=o(()=>b.response),i=o(()=>{var n;return((n=g.value)==null?void 0:n.type)==="prefect-agent"}),q=o(()=>u.value?`Your work pool ${u.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}=F({workPoolQueues:{name:_},workPools:{name:P}}),W=o(()=>[{label:"Details",hidden:V.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=O("tab","Details"),{tabs:B}=S(W,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"),$=p("p-layout-default");return u.value?(Y(),T($,{key:0,class:"work-pool-queue"},{header:a(()=>[t(e(j),{"work-pool-queue":u.value,"work-pool-name":e(l),onUpdate:e(w).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[t(C,{class:"work-pool-queue__body"},{header:a(()=>[t(e(G),{command:y.value,title:q.value,subtitle:Q.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(x,{selected:e(s),"onUpdate:selected":m[0]||(m[0]=R=>I(s)?s.value=R:null),tabs:e(B)},{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(M),{"work-pool-name":e(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[t(e(z),{filter:e(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):D("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-B41XnSdN.js.map
