"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2575:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(285),i=t(580),l=t(581),r=t(586),n=t(286),c=t(89),p=t(625),m=t(1284),o=t.n(m);const u=()=>{const{pathname:e}=(0,i.useLocation)(),s=(0,p.default)(),{data:{viewer:{permissions:{manageServerSpamFilter:t,manageServerMailBlackWhiteLists:m}},capability:{packages:{isSpamAssassinInstalled:u,isGreyListingInstalled:g}}}}=(0,r.useQuery)(o()),d=(0,a.useMemo)((()=>u||g?[t&&{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("settings"),url:"/cp/server/spam-filter/settings",id:"tabSettings"},m&&{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("black-list"),url:"/cp/server/spam-filter/black-list/",id:"tabBlackList"},m&&{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("white-list"),url:"/cp/server/spam-filter/white-list/",id:"tabWhiteList"}].filter(Boolean):null),[t,m,u,g]),b=(0,a.useMemo)((()=>d.findIndex((({url:s})=>(0,l.matchPath)(s,e)))+1),[d,e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Tabs,{active:b,children:d.map((({url:e,...t})=>(0,a.jsx)(n.Tab,{onActivate:()=>s(e),...t},e)))}),(0,a.jsx)(i.Outlet,{})]})}}}]);
//# sourceMappingURL=SpamFilterSettingsTabs.js.map?8b0973520a85f3cfc61d