"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2039:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(245),i=t(739),l=t(740),r=t(745),n=t(246),c=t(90),p=t(771),m=t(954),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?725454e5c7c55a7e1664