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