"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2631(e,s,t){t.r(s),t.d(s,{default:()=>m});var a=t(296),i=t(600),l=t(621),r=t(297),n=t(90),c=t(695),p=t(1283),o=t.n(p);const m=()=>{const{pathname:e}=(0,i.useLocation)(),s=(0,c.default)(),{data:{viewer:{permissions:{manageServerSpamFilter:t,manageServerMailBlackWhiteLists:p}},capability:{packages:{isSpamAssassinInstalled:m,isGreyListingInstalled:g}}}}=(0,l.useQuery)(o()),u=(0,a.useMemo)(()=>m||g?[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,m,g]),b=(0,a.useMemo)(()=>u.findIndex(({url:s})=>(0,i.matchPath)(s,e))+1,[u,e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Tabs,{active:b,children:u.map(({url:e,...t})=>(0,a.jsx)(r.Tab,{onActivate:()=>s(e),...t},e))}),(0,a.jsx)(i.Outlet,{})]})}}}]);
//# sourceMappingURL=SpamFilterSettingsTabs.js.map?4a3886abe65aff34a07b