(()=>{"use strict";const e=window.React,t=window.wp.components,n=window.wp.editPost,i=window.wp.plugins,l=window.wp.data,a=(0,e.createElement)("svg",{width:"150",height:"150",viewBox:"0 0 11.16 11.16",fillRule:"evenodd"},(0,e.createElement)("path",{d:"M.92.79V.8h0 .01l3.11 3.03 1.5 1.44L10.18.8c.04-.04.09-.07.15-.09.17-.07.36-.02.5.1.08.09.14.2.14.32v8.55c0 .44-.36.8-.8.8H.99c-.44 0-.8-.36-.8-.8V1.11h0c0-.24.2-.43.43-.43.12 0 .22.04.3.11zM2.3 5.14c-.3-.64.27-1.27.91-1.17.14.02.28.08.4.18l1.93 1.87 4.53-4.37c.05-.05.12-.08.19-.08a.28.28 0 0 1 .28.28v1.64L6.18 7.81c-.11.09-.21.17-.32.22-.21.12-.39.14-.62.03-.1-.04-.19-.11-.3-.19l-2.4-2.38a1.37 1.37 0 0 1-.24-.35z"}));function o(){let n=(0,l.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("meta")._mo_disable_npp}),[]);const i=(0,l.useDispatch)("core/editor").editPost;return(0,e.createElement)(t.ToggleControl,{label:mailoptin_globals.disable_notifications_txt,checked:"yes"===n,onChange:e=>{i({meta:{_mo_disable_npp:e?"yes":"no"}})}})}"1"===mailoptin_globals.sidebar&&(0,i.registerPlugin)("mailoptin-sidebar",{render:()=>(0,e.createElement)(n.PluginSidebar,{name:"mailoptin-sidebar",title:"MailOptin",icon:a},(0,e.createElement)(t.Panel,null,(0,e.createElement)(t.PanelBody,{title:"MailOptin",initialOpen:!0},(0,e.createElement)(t.PanelRow,null,(0,e.createElement)(o,null)))))})})();