import{d as R,h as U,W as d,j as e,t as f,by as V,ao as O,bx as S,c as T,k as a,a as Y,l as p,aO as j,o as A,m as t,n as o,d4 as F,cV as H,d5 as v,a6 as I,d6 as z,bH as E}from"./index-CKtbewUP.js";import{u as G}from"./usePageTitle-BJBko9bD.js";const M=R({__name:"WorkPoolQueue",setup(J){const c=U(),l=d("workPoolName"),P=e(()=>[l.value]),r=d("workPoolQueueName"),_=e(()=>[r.value]),k={interval:3e5},w=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),u=e(()=>w.response),b=f(c.workPools.getWorkPoolByName,[l.value],k),g=e(()=>b.response),i=e(()=>{var n;return((n=g.value)==null?void 0:n.type)==="prefect-agent"}),q=e(()=>u.value?`Your work pool ${u.value.name} is ready to go!`:"Your work queue is ready to go!"),y=e(()=>`prefect ${i.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),Q=e(()=>`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}=V({workPoolQueues:{name:_},workPools:{name:P}}),W=e(()=>[{label:"Details",hidden:j.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=O("tab","Details"),{tabs:h}=S(W,s),x=e(()=>r.value?`Work Pool Queue: ${r.value}`:"Work Pool Queue");return G(x),(n,m)=>{const B=p("p-tabs"),C=p("p-layout-well"),$=p("p-layout-default");return u.value?(A(),T($,{key:0,class:"work-pool-queue"},{header:a(()=>[t(o(F),{"work-pool-queue":u.value,"work-pool-name":o(l),onUpdate:o(w).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[t(C,{class:"work-pool-queue__body"},{header:a(()=>[t(o(H),{command:y.value,title:q.value,subtitle:Q.value},null,8,["command","title","subtitle"])]),well:a(()=>[t(o(v),{alternate:"","work-pool-name":o(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),default:a(()=>[t(B,{selected:o(s),"onUpdate:selected":m[0]||(m[0]=D=>I(s)?s.value=D:null),tabs:o(h)},{details:a(()=>[t(o(v),{"work-pool-name":o(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),"upcoming-runs":a(()=>[t(o(z),{"work-pool-name":o(l),"work-pool-queue":u.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[t(o(E),{filter:o(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):Y("",!0)}}});export{M as default};
//# sourceMappingURL=WorkPoolQueue-BDe8K4nP.js.map
