import{d as g,A as v,P as y,D as C,Y as x,e as c,U as F,c as u,h as t,i as p,o as n,k as s,C as V,E as i,u as e,G as D,H as R,X as N,j as _,I as U,M as A,J as B,N as T,F as M,a as P,p as S,Q as j,_ as E}from"./index-WCZ_4nWW.js";import{s as I,a as X}from"./index-oxmGsOwU.js";const Y={class:"workspace-dashboard__header-actions"},q={key:1,class:"workspace-dashboard__grid"},G={class:"workspace-dashboard__side"},z=g({__name:"Dashboard",setup(H){v(y,{interval:I(30)});const m=C(),r=x(m.flowRuns.getFlowRunsCount,[{}]),f=c(()=>r.executed),d=c(()=>r.response===0),k=[{text:"Dashboard"}],a=F({range:{type:"span",seconds:-X},tags:[]}),b=()=>E.map("WorkspaceDashboardFilter",a,"TaskRunsFilter");return(J,o)=>{const w=p("p-button"),h=p("p-layout-default");return n(),u(h,{class:"workspace-dashboard"},{header:t(()=>[s(e(N),{crumbs:k,class:"workspace-dashboard__page-heading"},V({_:2},[d.value?void 0:{name:"actions",fn:t(()=>[i("div",Y,[s(e(D),{selected:e(a).tags,"onUpdate:selected":o[0]||(o[0]=l=>e(a).tags=l),"empty-message":"All tags"},null,8,["selected"]),s(e(R),{modelValue:e(a).range,"onUpdate:modelValue":o[1]||(o[1]=l=>e(a).range=l),class:"workspace-dashboard__date-select"},null,8,["modelValue"])])]),key:"0"}]),1024)]),default:t(()=>[f.value?(n(),_(M,{key:0},[d.value?(n(),u(e(U),{key:0})):(n(),_("div",q,[s(e(A),{filter:e(a)},null,8,["filter"]),i("div",G,[s(e(B),{filter:b}),s(e(T),{class:"workspace-dashboard__work-pools",filter:e(a)},null,8,["filter"])])]))],64)):P("",!0),s(e(j),{title:"Ready to scale?",subtitle:"Automations, role and object-level security, and serverless push work pools on Prefect Cloud"},{actions:t(()=>[s(w,{to:"https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss&utm_term=none&utm_content=none",target:"_blank",primary:""},{default:t(()=>[S(" Upgrade to Cloud ")]),_:1})]),_:1})]),_:1})}}});export{z as default};
