import{d as g,G as v,H as y,M as C,f as V,h as c,J as x,k as u,c as p,l as t,o as l,n as s,N as F,O as i,u as e,Q as R,R as B,X as N,m as _,S as D,V as M,W as S,Y as A,B as T,a as U,t as W,Z as X,b as Y}from"./index-gULJbqdd.js";import{s as j,a as E}from"./index-oxmGsOwU.js";const G={class:"workspace-dashboard__header-actions"},H={key:1,class:"workspace-dashboard__grid"},I={class:"workspace-dashboard__side"},Z=g({__name:"Dashboard",setup(J){v(y,{interval:j(30)});const m=C(),r=V(m.flowRuns.getFlowRunsCount,[{}]),f=c(()=>r.executed),d=c(()=>r.response===0),k=[{text:"Dashboard"}],a=x({range:{type:"span",seconds:-E},tags:[]}),b=()=>Y.map("WorkspaceDashboardFilter",a,"TaskRunsFilter");return(O,o)=>{const w=u("p-button"),h=u("p-layout-default");return l(),p(h,{class:"workspace-dashboard"},{header:t(()=>[s(e(N),{crumbs:k,class:"workspace-dashboard__page-heading"},F({_:2},[d.value?void 0:{name:"actions",fn:t(()=>[i("div",G,[s(e(R),{selected:e(a).tags,"onUpdate:selected":o[0]||(o[0]=n=>e(a).tags=n),"empty-message":"All tags"},null,8,["selected"]),s(e(B),{modelValue:e(a).range,"onUpdate:modelValue":o[1]||(o[1]=n=>e(a).range=n),class:"workspace-dashboard__date-select"},null,8,["modelValue"])])]),key:"0"}]),1024)]),default:t(()=>[f.value?(l(),_(T,{key:0},[d.value?(l(),p(e(D),{key:0})):(l(),_("div",H,[s(e(M),{filter:e(a)},null,8,["filter"]),i("div",I,[s(e(S),{filter:b}),s(e(A),{class:"workspace-dashboard__work-pools",filter:e(a)},null,8,["filter"])])]))],64)):U("",!0),s(e(X),{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(()=>[W(" Upgrade to Cloud ")]),_:1})]),_:1})]),_:1})}}});export{Z as default};
