"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/InfoAndStatisticsPage/TrafficUsageLayoutPage"],{2988:(e,a,s)=>{s.r(a),s.d(a,{default:()=>f});var t=s(580),l=s(286),n=s(586),o=s(89),u=s(1227),c=s.n(u),i=s(285);const r=o.Locale.getSection("components.pages.InfoAndStatistics.TrafficUsage"),f=()=>{const e=(0,t.useLocation)(),a=(0,t.useNavigate)(),{data:{viewer:{type:s}}}=(0,n.useQuery)(c()),o=[{value:"domains",label:r.lmsg("domains")},{value:"customers",label:r.lmsg("customers")},"ADMIN"===s?{value:"resellers",label:r.lmsg("resellers")}:null].filter(Boolean),u=o.find((({value:a})=>e.pathname.includes(a)));return(0,i.jsx)(t.Outlet,{context:{trafficUsagePageDropdown:(0,i.jsx)(l.ButtonGroup,{children:o.map((({value:e,label:s})=>(0,i.jsx)(l.Button,{state:u.value===e?"active":"default",onClick:()=>a(e),children:s},e)))})}})}}}]);
//# sourceMappingURL=TrafficUsageLayoutPage.js.map?e68c5b846c1c99da4449