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