import{d as R,k as S,W as d,h as e,t as f,by as T,ao as Z,bx as D,c as E,i as a,a as O,j as p,aO as V,o as Y,l as u,m as o,d3 as j,cU as A,d4 as v,a6 as F,d5 as H,bH as I}from"./index-7qezL2zM.js";import{u as z}from"./usePageTitle-k72s0--o.js";const L=R({__name:"WorkPoolQueue",setup(G){const c=S(),l=d("workPoolName"),_=e(()=>[l.value]),r=d("workPoolQueueName"),P=e(()=>[r.value]),k={interval:3e5},i=f(c.workPoolQueues.getWorkPoolQueueByName,[l.value,r.value],k),t=e(()=>i.response),b=f(c.workPools.getWorkPoolByName,[l.value],k),q=e(()=>b.response),w=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 ${w.value?"agent":"worker"} start --pool "${l.value}" --work-queue "${r.value}"`),Q=e(()=>`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}=T({workPoolQueues:{name:P},workPools:{name:_}}),W=e(()=>[{label:"Details",hidden:V.xl},{label:"Upcoming Runs"},{label:"Runs"}]),s=Z("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 h=p("p-tabs"),C=p("p-layout-well"),U=p("p-layout-default");return t.value?(Y(),E(U,{key:0,class:"work-pool-queue"},{header:a(()=>[u(o(j),{"work-pool-queue":t.value,"work-pool-name":o(l),onUpdate:o(i).refresh},null,8,["work-pool-queue","work-pool-name","onUpdate"])]),default:a(()=>[u(C,{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(h,{selected:o(s),"onUpdate:selected":m[0]||(m[0]=$=>F(s)?s.value=$: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(H),{"work-pool-name":o(l),"work-pool-queue":t.value},null,8,["work-pool-name","work-pool-queue"])]),runs:a(()=>[u(o(I),{filter:o(N),prefix:"runs"},null,8,["filter"])]),_:1},8,["selected","tabs"])]),_:1})]),_:1})):O("",!0)}}});export{L as default};
//# sourceMappingURL=WorkPoolQueue-DuHIkwvt.js.map
