Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/plugins/comments/components/ResolvedCommentsToggle",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$react","../../../app/actions/toggleShowResolvedComments","../../../app/contexts/StoreContext"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ResolvedCommentsToggle(){const e=(0,l.useDispatch)(),t=(0,l.useSelector)((e=>!!e.showResolvedComments)),o=(0,l.useSelector)((e=>Object.values(e.fragmentEntryLinks||{}).some((e=>e.comments&&e.comments.some((e=>e.resolved))))));return(0,n.useEffect)((()=>{o||e((0,a.default)({showResolvedComments:!1}))}),[e,o]),n.default.createElement("div",{className:"pb-3 px-3"},n.default.createElement(r.ClayCheckbox,{checked:t,disabled:!t&&!o,label:Liferay.Language.get("show-resolved-comments"),onChange:t=>e((0,a.default)({showResolvedComments:Boolean(t.target.checked)}))}))};var r=o("@frontend-taglib-clay$clayui/form"),n=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 o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(o,n,a):o[n]=e[n]}o.default=e,t&&t.set(e,o);return o}(o("liferay!frontend-js-react-web$react")),a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(o("../../../app/actions/toggleShowResolvedComments")),l=o("../../../app/contexts/StoreContext");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}}}));
//# sourceMappingURL=ResolvedCommentsToggle.js.map