"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2188:(e,s,t)=>{t.r(s),t.d(s,{default:()=>u});var a=t(270),i=t(575),l=t(576),r=t(581),n=t(271),c=t(89),p=t(615),m=t(870),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?e9c2498c6432efe3ee2c