Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/layout-data-items/CollectionItemWithControls",["module","exports","require","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../contexts/CollectionItemContext","../topper/TopperEmpty"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(r("liferay!frontend-js-react-web$classnames")),n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=o?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("../../contexts/CollectionItemContext"),l=c(r("../topper/TopperEmpty"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}var f=n.default.forwardRef((({children:e,item:t},r)=>{const{collectionItem:i}=(0,n.useContext)(a.CollectionItemContext),c=i.title||i.name||i.defaultTitle;return n.default.createElement("div",{className:(0,o.default)("page-editor__collection__block",{empty:!c,"flex-grow-1":!e.length})},n.default.createElement(l.default,{item:t},0===n.default.Children.count(e)?n.default.createElement("div",{className:(0,o.default)("page-editor__collection-item",{empty:!e.length}),ref:r},n.default.createElement("div",{className:"page-editor__collection-item__border"},n.default.createElement("p",{className:"page-editor__collection-item__title"},c||Liferay.Language.get("sample-collection-item")))):n.default.createElement("div",{ref:r},e)))}));t.default=f}}));
//# sourceMappingURL=CollectionItemWithControls.js.map