"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2106:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(270),i=t(574),l=t(575),r=t(579),n=t(271),c=t(89),p=t(611),m=t(830),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?95673bc5aac7107fd171