Liferay.Loader.define("layout-admin-web@5.0.145/js/dynamic_include/InformationMessages",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/link","@frontend-taglib-clay$clayui/popover","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default({linkedLayoutMessage:e,portletNamespace:t,resetPrototypeURL:a,showLinkedLayoutMessage:u,showModifiedLayoutMessage:c}){const[f,d]=(0,l.useState)(!1),s=(0,l.useRef)(),y="".concat(t,"infoPopover");return(0,o.useEventListener)("click",(({target:e})=>{e.closest("#".concat(y))||d(!1)}),!1,window),l.default.createElement(i.default,{alignPosition:"bottom",id:y,onKeyDown:e=>{"Escape"===e.key&&(d(!1),s.current.focus())},onShowChange:d,show:f,trigger:l.default.createElement(n.ClayButtonWithIcon,{"data-qa-id":"info",displayType:"unstyled",onClick:e=>{e.stopPropagation(),d((e=>!e))},ref:e=>{s.current=e},size:"sm",symbol:"information-live",title:Liferay.Language.get("additional-information")})},c&&l.default.createElement("div",null,l.default.createElement("p",{className:"c-mt-0 message-info",dangerouslySetInnerHTML:{__html:Liferay.Language.get("this-page-has-been-changed-since-the-last-update-from-the-site-template")}}),l.default.createElement(r.default,{button:{small:!0},displayType:"primary",href:a},Liferay.Language.get("reset-changes"))),u&&l.default.createElement("p",{className:"c-my-0 message-info"},e))};var n=a("@frontend-taglib-clay$clayui/button"),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/link")),i=_interopRequireDefault(a("@frontend-taglib-clay$clayui/popover")),o=a("@liferay/frontend-js-react-web"),l=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 a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(a,r,i):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=InformationMessages.js.map