import{s as e}from"./graphql-Dsv3IYEA.js";import{t}from"./jsx-runtime-BKZ-v_4m.js";import{n}from"./not-found-i5RsCZif.js";import{t as r}from"./useTranslation-l30fIyqu.js";import{r as i}from"./Heading-DoTcf-3Y.js";import{S as a,n as o,t as s}from"./main-CxGi0fIe.js";import{t as c}from"./ButtonLink-BcHfDxZ3.js";import{n as l,r as u,t as d}from"./Filter-Chj7kh4P.js";var f=t();function p(){let{t}=r(),{inactive:p,pagination:m}=s.useLoaderDeps(),{data:{viewerSession:h}}=e(o(m,p));if(h.__typename!==`BrowserSession`)throw n();let[g,_]=a(m,h.user.browserSessions.pageInfo,6),v=[...h.user.browserSessions.edges].reverse();return(0,f.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,f.jsx)(i,{children:t(`frontend.browser_sessions_overview.heading`)}),(0,f.jsx)(`div`,{className:`flex gap-2 items-start`,children:(0,f.jsx)(d,{to:`/sessions/browsers`,enabled:p,search:{inactive:p?void 0:!0},children:t(`frontend.last_active.inactive_90_days`)})}),v.map(e=>(0,f.jsx)(u,{session:e.node,isCurrent:h.id===e.node.id},e.cursor)),h.user.browserSessions.totalCount===0&&(0,f.jsx)(l,{children:t(p?`frontend.browser_sessions_overview.no_active_sessions.inactive_90_days`:`frontend.browser_sessions_overview.no_active_sessions.default`)}),(_||g)&&(0,f.jsxs)(`div`,{className:`flex *:flex-1`,children:[(0,f.jsx)(c,{kind:`secondary`,size:`md`,disabled:!_,to:`/sessions/browsers`,search:_||m,resetScroll:!0,children:t(`common.previous`)}),(0,f.jsx)(`div`,{}),(0,f.jsx)(c,{kind:`secondary`,size:`md`,disabled:!g,to:`/sessions/browsers`,search:g||m,resetScroll:!0,children:t(`common.next`)})]})]})}export{p as component};
//# sourceMappingURL=_account.sessions.browsers-Bi2Oa7MR.js.map