"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2777(e,s,t){t.r(s),t.d(s,{default:()=>m});var a=t(378),i=t(694),l=t(715),r=t(379),n=t(95),c=t(789),p=t(1378),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?b4fcdca9506dd9d456c9