(()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,n=window.wp.hooks,o=window.wp.data,a=window.wp.primitives,i=(0,e.createElement)(a.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})),l=window.wp.components,s=()=>{const a=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta")||{})),i=(0,o.useDispatch)("core/editor");let s=[];return s=(0,n.applyFilters)("oceanwp.postSetting.sidePanel.controls",s),(0,e.createElement)("div",{className:"ocean-post-settings-container"},(0,e.createElement)("div",{className:"settings-modal-window"},(0,e.createElement)(l.BaseControl,{__nextHasNoMarginBottom:!0},(0,e.createElement)(l.ButtonGroup,{className:"ocean-component-button-group"},(0,e.createElement)("div",{className:"ocean-component-button-group--label ocean-component-label"},(0,t.__)("Side Panel","ocean-side-panel")),(0,e.createElement)("div",{className:"ocean-component-button-group__buttons"},(0,e.createElement)(l.Button,{variant:"default"===a.osp_disable_panel?"primary":"secondary",onClick:()=>{i.editPost({meta:{osp_disable_panel:"default"}})}},(0,t.__)("Default","ocean-side-panel")),(0,e.createElement)(l.Button,{variant:"off"===a.osp_disable_panel?"primary":"secondary",onClick:()=>{i.editPost({meta:{osp_disable_panel:"off"}})}},(0,t.__)("Disable","ocean-side-panel")))))),s&&Object.entries(s).map((([t,n])=>(0,e.createElement)("div",{key:t,className:n.class},n.content))),(0,n.doAction)("oceanwp.postSetting.sidePanel.registeredControls",s))};(0,n.addFilter)("oceanwp.postSetting.registerModule","oceanwp.postSetting.module",(function(t){return t.sidePanel={title:"Side Panel",class:"ocean-setting-side-panel",panelClass:"ocean-setting-panel is-addon",initialOpen:!1,icon:i,priority:130,category:"addon",postType:"all",content:(0,e.createElement)(s,null)},t}))})();