Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.141/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 CommentsSidebar(){const e=(0,s.useActiveItemId)(),[t]=(0,u.useSessionState)(a.HIGHLIGHTED_COMMENT_ID_KEY),n=(0,i.useSelectorCallback)((t=>{const getActiveFragmentEntryLink=e=>{const n=t.layoutData.items[e];if(n){if(n.type===r.LAYOUT_DATA_ITEM_TYPES.fragment)return t.fragmentEntryLinks[n.config.fragmentEntryLinkId]||null;if(n.parentId)return getActiveFragmentEntryLink(n.parentId)}return null};return getActiveFragmentEntryLink(e)}),[e,t]);return o.default.createElement("div",{className:"d-flex flex-column",onMouseDown:e=>e.nativeEvent.stopImmediatePropagation()},n?o.default.createElement(l.default,{fragmentEntryLink:n}):o.default.createElement(m.default,null))};var o=_interopRequireDefault(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"),u=n("../../../core/hooks/useSessionState"),l=_interopRequireDefault(n("./FragmentComments")),m=_interopRequireDefault(n("./FragmentEntryLinksWithComments"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=CommentsSidebar.js.map