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