Liferay.Loader.define("layout-admin-web@5.0.105/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({linkedLayoutMessage:e,portletNamespace:t,resetPrototypeURL:a,showLinkedLayoutMessage:u,showModifiedLayoutMessage:c}){const[f,s]=(0,l.useState)(!1),d=(0,l.useRef)(),y="".concat(t,"infoPopover");return(0,i.useEventListener)("click",(({target:e})=>{e.closest("#".concat(y))||s(!1)}),!1,window),l.default.createElement(o.default,{alignPosition:"bottom",id:y,onKeyDown:e=>{"Escape"===e.key&&(s(!1),d.current.focus())},onShowChange:s,show:f,trigger:l.default.createElement(n.ClayButtonWithIcon,{"data-qa-id":"info",displayType:"unstyled",onClick:e=>{e.stopPropagation(),s((e=>!e))},ref:e=>{d.current=e},small:!0,symbol:"information-live",title:Liferay.Language.get("additional-information")})},c&&l.default.createElement("div",null,l.default.createElement("p",{className:"message-info mt-0",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:"message-info my-0"},e))};var n=a("@frontend-taglib-clay$clayui/button"),r=c(a("@frontend-taglib-clay$clayui/link")),o=c(a("@frontend-taglib-clay$clayui/popover")),i=a("@liferay/frontend-js-react-web"),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();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 o=n?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(a,r,o):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=InformationMessages.js.map