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