"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/InfoAndStatisticsPage"],{2552:(e,t,n)=>{n.r(t),n.d(t,{default:()=>f});var s=n(575),a=n(271),i=n(581),l=n(636),o=n(89),r=n(811),c=n.n(r),u=(n(2553),n(270));const d=o.Locale.getTranslate("components.pages.InfoAndStatistics.Main"),f=()=>{const e=(0,s.useLocation)(),{data:{viewer:{type:t,permissions:{manageServerInfo:n}}}}=(0,i.useQuery)(c()),o=["ADMIN"===t&&n?{title:(0,u.jsx)(d,{content:"overview"}),link:"overview"}:null,{title:(0,u.jsx)(d,{content:"domains"}),link:"domains"},{title:(0,u.jsx)(d,{content:"trafficUsage"}),link:"traffic-usage"},{title:(0,u.jsx)(d,{content:"reports"}),link:"summary-report"}].filter(Boolean),r=o.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:r,children:o.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,{})]})}},2551:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s.default});var s=n(2552)},2553:(e,t,n)=>{n.r(t)}}]);
//# sourceMappingURL=InfoAndStatisticsPage.js.map?878a3e61cf8788c774d0