"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/InfoAndStatisticsPage"],{2567:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var s=n(592),a=n(271),i=n(598),l=n(655),r=n(89),o=n(838),c=n.n(o),u=(n(2568),n(270));const d=r.Locale.getTranslate("components.pages.InfoAndStatistics.Main"),m=()=>{const e=(0,s.useLocation)(),{data:{viewer:{type:t,permissions:{manageServerInfo:n,manageServerDomainTrafficReport:r,manageServerSummaryReport:o}}}}=(0,i.useQuery)(c()),m=["ADMIN"===t&&n?{title:(0,u.jsx)(d,{content:"overview"}),link:"overview"}:null,{title:(0,u.jsx)(d,{content:"domains"}),link:"domains"},"ADMIN"!==t||r?{title:(0,u.jsx)(d,{content:"trafficUsage"}),link:"traffic-usage"}:null,"ADMIN"!==t||o?{title:(0,u.jsx)(d,{content:"reports"}),link:"summary-report"}:null].filter(Boolean),f=m.findLastIndex((({link:t})=>e.pathname.includes(t)))+1;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(a.Columns,{gap:"xs",children:[(0,u.jsx)(a.Column,{fill:!0,children:(0,u.jsx)(a.Tabs,{active:f,children:m.map((({title:e,link:t})=>(0,u.jsx)(a.Tab,{component:l.default,title:e,to:t},t)))})}),"ADMIN"===t&&(0,u.jsx)(a.Column,{children:(0,u.jsx)(a.Button,{className:"info-and-statistics-page-button",component:l.default,to:"/cp/server/settings/",children:(0,u.jsx)(d,{content:"serverSettings"})})})]}),(0,u.jsx)(s.Outlet,{})]})}},2566:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s.default});var s=n(2567)},2568:(e,t,n)=>{n.r(t)}}]);
//# sourceMappingURL=InfoAndStatisticsPage.js.map?2e3474f2a7c1db6282a7