"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/tabs/SpamFilterSettingsTabs"],{2765(e,s,t){t.r(s),t.d(s,{default:()=>m});var a=t(396),i=t(715),l=t(739),r=t(397),n=t(95),c=t(813),p=t(1343),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?fcc8d3061248d43c0f98