Liferay.Loader.define("product-navigation-control-menu@6.0.52/js/Collection",["module","exports","require","@liferay/layout-content-page-editor-web","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./AddPanel","./TabItem"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r("@liferay/layout-content-page-editor-web"),l=d(r("liferay!frontend-js-react-web$classnames")),n=(d(r("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=i();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var n=a?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(r,l,n):r[l]=e[l]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),o=r("./AddPanel"),c=d(r("./TabItem"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}const e=({collection:t,isContentTab:r,isSearchResult:i,open:d})=>{const{displayGrid:u}=(0,n.useContext)(o.AddPanelContext);return n.default.createElement(a.Collapse,{key:t.collectionId,label:t.label,open:i||d},t.collections&&t.collections.map(((t,r)=>n.default.createElement(e,{collection:t,isSearchResult:i,key:r}))),n.default.createElement("ul",{className:(0,l.default)("list-unstyled",{grid:r&&u})},t.children.map((e=>{var t;return n.default.createElement(n.default.Fragment,{key:e.itemId},n.default.createElement(c.default,{item:e}),(null===(t=e.portletItems)||void 0===t?void 0:t.length)&&n.default.createElement(f,{items:e.portletItems}))}))))},f=({items:e})=>n.default.createElement("ul",{className:"list-unstyled"},e.map((e=>n.default.createElement(c.default,{item:e,key:e.data.portletItemId}))));var u=e;t.default=u}}));
//# sourceMappingURL=Collection.js.map