Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/plugins/comments/components/CommentsSidebar",["module","exports","require","liferay!frontend-js-react-web$react","../../../app/config/constants/highlightedCommentIdKey","../../../app/config/constants/layoutDataItemTypes","../../../app/contexts/ControlsContext","../../../app/contexts/StoreContext","../../../core/hooks/useSessionState","./FragmentComments","./FragmentEntryLinksWithComments"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=(0,s.useActiveItemId)(),[t]=(0,l.useSessionState)(a.HIGHLIGHTED_COMMENT_ID_KEY),n=(0,i.useSelectorCallback)((t=>{const n=e=>{const o=t.layoutData.items[e];if(o){if(o.type===r.LAYOUT_DATA_ITEM_TYPES.fragment)return t.fragmentEntryLinks[o.config.fragmentEntryLinkId]||null;if(o.parentId)return n(o.parentId)}return null};return n(e)}),[e,t]);return o.default.createElement("div",{className:"d-flex flex-column",onMouseDown:e=>e.nativeEvent.stopImmediatePropagation()},n?o.default.createElement(c.default,{fragmentEntryLink:n}):o.default.createElement(m.default,null))};var o=u(n("liferay!frontend-js-react-web$react")),a=n("../../../app/config/constants/highlightedCommentIdKey"),r=n("../../../app/config/constants/layoutDataItemTypes"),s=n("../../../app/contexts/ControlsContext"),i=n("../../../app/contexts/StoreContext"),l=n("../../../core/hooks/useSessionState"),c=u(n("./FragmentComments")),m=u(n("./FragmentEntryLinksWithComments"));function u(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=CommentsSidebar.js.map