Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/fragment-configuration-fields/SpacingBoxField",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../common/components/InvisibleFieldset","../../../common/components/SpacingBox","../../../core/hooks/useControlledState","../../../prop-types/index","../../contexts/StoreContext","../../selectors/selectCanDetachTokenValues","../../utils/getPreviousResponsiveStyle"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.SpacingBoxField=function({disabled:e,field:t,item:r,onValueSelect:u,value:f}){const[p,y]=(0,a.default)(f),b=(0,c.useSelector)(i.default),m=(0,c.useSelector)((e=>e.selectedViewportSize)),O=(0,n.useMemo)((()=>{const e={};return t.typeOptions.spacingFieldSets.forEach((t=>{t.styles.forEach((t=>{e[t.name]=t}))})),e}),[t.typeOptions.spacingFieldSets]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.default,{disabled:e},t.label?n.default.createElement("div",{className:"sr-only"},t.label):null,n.default.createElement(l.default,{canSetCustomValue:b,fields:O,onChange:(e,t,{isReset:n=!1}={})=>{if(n){const t=(0,s.default)(e,r.config,m);y((r=>d(d({},r),{},{[e]:t})))}else y((r=>d(d({},r),{},{[e]:t})));u(e,t)},value:p})))};f(r("liferay!frontend-js-react-web$prop-types"));var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=n?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=f(r("../../../common/components/InvisibleFieldset")),l=f(r("../../../common/components/SpacingBox")),a=f(r("../../../core/hooks/useControlledState")),c=(r("../../../prop-types/index"),r("../../contexts/StoreContext")),i=f(r("../../selectors/selectCanDetachTokenValues")),s=f(r("../../utils/getPreviousResponsiveStyle"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function p(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 d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}));
//# sourceMappingURL=SpacingBoxField.js.map