Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/page_editor/app/components/WidgetsManager",["module","exports","require","liferay!frontend-js-react-web$react","../actions/updateWidgets","../contexts/StoreContext","../selectors/selectSegmentsExperienceId","../selectors/selectWidgetFragmentEntryLinks","../thunks/loadWidgets"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function WidgetsManager(){const e=(0,i.useDispatch)(),t=(0,i.useSelector)((e=>{const t=(0,s.default)(e);return Object.values(e.fragmentEntryLinks).filter((e=>{let{portletId:r,removed:n}=e,o=function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["portletId","removed"]);return r&&!n&&o.segmentsExperienceId===t})).map((({fragmentEntryLinkId:e})=>e)).join(",")})),r=(0,i.useSelectorRef)(a.default);return(0,n.useEffect)((()=>{e((0,o.default)({fragmentEntryLinks:r.current}))}),[t,r,e]),(0,n.useEffect)((()=>{const t=Liferay.on("addPortletConfigurationTemplate",(()=>{e((0,u.default)({fragmentEntryLinks:r.current}))}));return()=>{t.detach()}}),[r,e]),null};var n=r("liferay!frontend-js-react-web$react"),o=_interopRequireDefault(r("../actions/updateWidgets")),i=r("../contexts/StoreContext"),s=_interopRequireDefault(r("../selectors/selectSegmentsExperienceId")),a=_interopRequireDefault(r("../selectors/selectWidgetFragmentEntryLinks")),u=_interopRequireDefault(r("../thunks/loadWidgets"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=WidgetsManager.js.map