import{d as g,I as v,K as y,M as C,Y as V,e as c,L as x,c as u,i as t,j as p,o as l,m as s,N as F,O as i,u as e,P as R,Q as B,X as N,l as _,R as A,S as D,T as S,U as T,F as U,a as M,q as j,W as I,v as K}from"./index-bD6G21oH.js";import{s as O,a as P}from"./index-oxmGsOwU.js";const W={class:"workspace-dashboard__header-actions"},X={key:1,class:"workspace-dashboard__grid"},Y={class:"workspace-dashboard__side"},z=g({__name:"Dashboard",setup(q){v(y,{interval:O(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:-P},tags:[]}),b=()=>K.map("WorkspaceDashboardFilter",a,"TaskRunsFilter");return(E,o)=>{const h=p("p-button"),w=p("p-layout-default");return l(),u(w,{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",W,[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(),_(U,{key:0},[d.value?(l(),u(e(A),{key:0})):(l(),_("div",X,[s(e(D),{filter:e(a)},null,8,["filter"]),i("div",Y,[s(e(S),{filter:b}),s(e(T),{class:"workspace-dashboard__work-pools",filter:e(a)},null,8,["filter"])])]))],64)):M("",!0),s(e(I),{title:"Ready to scale?",subtitle:"Automations, role and object-level security, and serverless push work pools on Prefect Cloud"},{actions:t(()=>[s(h,{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{z as default};
