Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/app/hooks/app_hooks/usePortletConfigurationListener",["module","exports","require","liferay!frontend-js-react-web$react","../../actions/updateDraft","../../actions/updatePageContents","../../contexts/StoreContext","../../selectors/selectSegmentsExperienceId","../../services/InfoItemService"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function usePortletConfigurationListener(){const t=(0,i.useDispatch)(),o=(0,i.useSelector)(s.default);(0,r.useEffect)((()=>{const onEditConfiguration=({portletId:r})=>{e.includes(r)&&u.default.getPageContents({onNetworkStatus:t,segmentsExperienceId:o}).then((e=>{t((0,a.default)({pageContents:e}))})),t((0,n.default)({draft:!0}))};return Liferay.on("editConfiguration",onEditConfiguration),()=>Liferay.detach("editConfiguration",onEditConfiguration)}),[t,o])};var r=o("liferay!frontend-js-react-web$react"),n=_interopRequireDefault(o("../../actions/updateDraft")),a=_interopRequireDefault(o("../../actions/updatePageContents")),i=o("../../contexts/StoreContext"),s=_interopRequireDefault(o("../../selectors/selectSegmentsExperienceId")),u=_interopRequireDefault(o("../../services/InfoItemService"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const e=["com_liferay_journal_content_web_portlet_JournalContentPortlet","com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet"]}}));
//# sourceMappingURL=usePortletConfigurationListener.js.map