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