"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2010:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(270),i=t(581),l=t(582),r=t(590),n=t(271),c=t(89),p=t(616),m=t(820),o=t.n(m);const u=()=>{const{pathname:e}=(0,i.useLocation)(),s=(0,p.default)(),{data:{viewer:{permissions:{manageServerSpamFilter:t}},capability:{packages:{isSpamAssassinInstalled:m,isGreyListingInstalled:u}}}}=(0,r.useQuery)(o()),g=t&&(m||u),d=(0,a.useMemo)((()=>g?[{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("settings"),url:"/cp/server/spam-filter/settings",id:"tabSettings"},{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("black-list"),url:"/cp/server/spam-filter/black-list/",id:"tabBlackList"},{title:c.Locale.getSection("components.pages.server-spam-filter").lmsg("white-list"),url:"/cp/server/spam-filter/white-list/",id:"tabWhiteList"}].filter(Boolean):null),[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?7d29d05bec01a518ebc8