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