(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[7050],{3075:e=>{e.exports=function(){return this.wp.i18n}()},8601:e=>{e.exports=function(){return this.wp.element}()},17232:e=>{e.exports=function(){return this.wp.domReady}()},31987:e=>{e.exports=function(){return this.wp.data}()},35145:e=>{e.exports=function(){return this.itsec.core["admin-notices-api"]}()},39959:e=>{e.exports=function(){return this.wp.components}()},43848:(e,t,n)=>{"use strict";var o=n(51609),i=n(17232),s=n.n(i),c=n(8601),r=n(3075),a=n(39959),l=(n(35145),n(46942)),u=n.n(l),p=n(79487),d=n(31987),m=n(26843),h=n(60158);function w(){const[e,t]=(0,c.useState)(!1),{notices:n,noticesLoaded:i}=(0,d.useSelect)((e=>({notices:e("ithemes-security/admin-notices").getNotices(),noticesLoaded:e("ithemes-security/admin-notices").areNoticesLoaded()})));return(0,o.createElement)(p.b,{theme:m.$f},(0,o.createElement)(a.Button,{id:"itsec-admin-notices-toolbar-trigger",className:u()("ab-item ab-empty-item",{"itsec-admin-notices-toolbar--has-notices":n.length>0}),onClick:()=>t(!e),"aria-expanded":e},(0,o.createElement)("span",{className:"it-icon-itsec"}),(0,o.createElement)("span",{className:"itsec-toolbar-text"},(0,r.__)("Security","better-wp-security")),n.length>0&&(0,o.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble"},(0,o.createElement)("span",{className:"itsec-admin-notices-toolbar-bubble__count"},n.length))),e&&(0,o.createElement)(a.Popover,{className:"itsec-admin-notices-toolbar__popover",noArrow:!0,expandOnMobile:!0,focusOnMount:"container",position:"bottom center",headerTitle:(0,r.__)("Security","better-wp-security"),onClose:()=>t(!1),onFocusOutside:()=>t(!1)},(0,o.createElement)(h.A,{notices:n,loaded:i,close:()=>t(!1)})))}const b=function({portalEl:e}){return(0,o.createElement)(a.SlotFillProvider,null,(0,c.createPortal)((0,o.createElement)(a.Popover.Slot,null),e),(0,o.createElement)(w,null))};n.p=window.itsecWebpackPublicPath,(0,r.setLocaleData)({"":{}},"better-wp-security"),s()((()=>{const e=document.getElementById("wp-admin-bar-itsec_admin_bar_menu"),t=document.getElementById("itsec-admin-notices-root");e&&(0,c.createRoot)(e).render((0,o.createElement)(b,{portalEl:t}))}))},46627:e=>{e.exports=function(){return this.itsec.packages.data}()},51609:e=>{"use strict";e.exports=window.React},55933:e=>{e.exports=function(){return this.wp.primitives}()},62247:e=>{e.exports=function(){return this.wp.isShallowEqual}()},66087:e=>{"use strict";e.exports=window.lodash},77172:e=>{e.exports=function(){return this.wp.url}()},79860:e=>{e.exports=function(){return this.wp.keycodes}()},85631:e=>{e.exports=function(){return this.wp.apiFetch}()},89897:e=>{e.exports=function(){return this.wp.compose}()},89959:e=>{e.exports=function(){return this.wp.date}()},96126:e=>{e.exports=function(){return this.wp.deprecated}()}},e=>{e.O(0,[9427,6843,2038,9819,2932,3520,5596,2871],(()=>e(e.s=43848)));var t=e.O();((window.itsec=window.itsec||{}).core=window.itsec.core||{})["admin-notices"]=t}]);