!function(){"use strict";var e=window.wp.i18n,t=window.wp.element,r=window.wp.compose,n=window.wp.data,o=window.wp.components,i=window.wp.plugins;function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=window.ReactJSXRuntime,f=(0,r.compose)([(0,n.withSelect)((function(){return{hideFooterWidgets:(0,n.select)("core/editor").getEditedPostAttribute("meta")._genesis_hide_footer_widgets}})),(0,n.withDispatch)((function(e){return{onUpdate:function(t){var r,o;e("core/editor").editPost({meta:(r=!!t,o=(0,n.select)("core/editor").getEditedPostAttribute("meta"),l(l({},Object.keys(o).filter((function(e){return e.startsWith("_genesis")})).reduce((function(e,t){return e[t]=o[t],null===e[t]&&(e[t]=!1),e}),{})),{},s({},"_genesis_hide_footer_widgets",r)))})}}}))])((function(r){var n=r.hideFooterWidgets,i=void 0!==n&&n,c=r.onUpdate;return(0,d.jsx)(t.Fragment,{children:(0,d.jsx)(o.Fill,{name:"GenesisSidebar",children:(0,d.jsx)(o.PanelBody,{initialOpen:!0,title:(0,e.__)("Footer Widgets","genesis"),children:(0,d.jsx)(o.PanelRow,{children:(0,d.jsx)(o.CheckboxControl,{label:(0,e.__)("Hide Footer Widgets","genesis"),checked:!!i,onChange:function(){return c(!i)}})})})})})}));(0,i.registerPlugin)("genesis-footer-widgets-toggle",{render:f})}();