Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/layout-data-items/RowWithControls",["module","exports","require","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../core/hooks/useSetRef","../../../prop-types/index","../../contexts/ResizeContext","../../contexts/StoreContext","../../selectors/selectCanUpdateItemConfiguration","../../utils/getLayoutDataItemTopperUniqueClassName","../../utils/getResponsiveColumnSize","../../utils/getResponsiveConfig","../../utils/isItemEmpty","../topper/Topper","./Row"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(o("liferay!frontend-js-react-web$classnames")),n=(g(o("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=r?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(o,n,i):o[n]=e[n]}o.default=e,t&&t.set(e,o);return o}(o("liferay!frontend-js-react-web$react"))),i=g(o("../../../core/hooks/useSetRef")),s=(o("../../../prop-types/index"),o("../../contexts/ResizeContext")),a=o("../../contexts/StoreContext"),l=g(o("../../selectors/selectCanUpdateItemConfiguration")),u=g(o("../../utils/getLayoutDataItemTopperUniqueClassName")),f=o("../../utils/getResponsiveColumnSize"),p=o("../../utils/getResponsiveConfig"),c=g(o("../../utils/isItemEmpty")),d=g(o("../topper/Topper")),m=g(o("./Row"));function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function g(e){return e&&e.__esModule?e:{default:e}}const e=12;function v(t,o,r){return function(t,o,r){const n=[];let i=[],s=0;return t.children.forEach((t=>{const a=o.items[t],l=(0,f.getResponsiveColumnSize)(a.config,r);s+=l,i.push(a),s===e&&(n.push(i),i=[],s=0)})),n}(t,o,r).some((e=>e.every((e=>(0,c.default)(e,o,r)))))}var w=n.default.forwardRef((({children:e,item:t},o)=>{const[f,c]=(0,n.useState)(!1),[y,g]=(0,n.useState)(null),w=(0,a.useSelector)(l.default),C=(0,a.useSelector)((e=>e.layoutData)),b=(0,a.useSelector)((e=>e.selectedViewportSize)),R=(0,p.getResponsiveConfig)(t.config,b),[S,x]=(0,i.default)(o),{verticalAlignment:j}=R,{height:h}=R.styles;return n.default.createElement(d.default,{className:(0,u.default)(t.itemId),item:t,itemElement:x},n.default.createElement(m.default,{className:(0,r.default)({"align-bottom":"bottom"===j,"align-middle":"middle"===j,empty:v(t,C,b)&&!h,"page-editor__row":w,"page-editor__row-overlay-grid":f}),item:t,ref:S},n.default.createElement(s.ResizeContextProvider,{value:{nextColumnSizes:y,resizing:f,setNextColumnSizes:g,setResizing:c}},e)))}));t.default=w}}));
//# sourceMappingURL=RowWithControls.js.map