import{b as l,j as n}from"./dagview-B70jDsRo.js";import{a as d,u,i as b,S as v,t as x,s as _}from"./index-BtlF3Z3-.js";import"./grpc-B19WqHns.js";import"./react-OeWQAlMQ.js";import"./markdown-CPoGw-1N.js";function h(e,o,i){return e===0?"No sessions yet":`${o} active of ${e} ${e===1?"session":"sessions"} across ${i} ${i===1?"environment":"environments"}`}const j="_page_xzj8l_1",g="_header_xzj8l_9",S="_title_xzj8l_18",f="_subtitle_xzj8l_25",N="_tableWrap_xzj8l_31",a={page:j,header:g,title:S,subtitle:f,tableWrap:N};function W(){const{sessions:{sessions:e},environments:{environments:o},tasks:{tasks:i},personas:{personas:c}}=d(),r=u(),t=l.useMemo(()=>e.filter(s=>s.environmentId!==""),[e]),m=l.useMemo(()=>t.filter(s=>b(s)).length,[t]),p=l.useMemo(()=>new Set(t.map(s=>s.environmentId)).size,[t]);return n.jsxs("div",{className:a.page,"data-testid":"sessions-page",children:[n.jsxs("header",{className:a.header,children:[n.jsx("h1",{className:a.title,children:"Sessions"}),n.jsx("p",{className:a.subtitle,"data-testid":"sessions-summary",children:h(t.length,m,p)})]}),n.jsx("div",{className:a.tableWrap,children:n.jsx(v,{sessions:t,environments:o,tasks:i,personas:c,onOpenSession:s=>r(_(s)),onOpenTask:s=>r(x(s))})})]})}export{W as SessionsListPage};
//# sourceMappingURL=SessionsListPage-el3Nr2mt.js.map
