Liferay.Loader.define("layout-set-prototype-web@5.0.30/js/dynamic_include/PropagationMessage",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/link","@frontend-taglib-clay$clayui/popover","@liferay/frontend-js-react-web","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({enableDisablePropagationURL:e,portletNamespace:t,readyForPropagation:a,triggerPropagation:s}){const[u,f]=(0,c.useState)(!1),d=(0,c.useRef)(),g="".concat(t,"infoPopover");return(0,i.useEventListener)("click",(({target:e})=>{e.closest("#".concat(g))||f(!1)}),!1,window),c.default.createElement(o.default,{alignPosition:"bottom",id:g,onKeyDown:e=>{"Escape"===e.key&&(f(!1),d.current.focus())},onShowChange:f,show:u,size:"lg",trigger:c.default.createElement(n.ClayButtonWithIcon,{"data-qa-id":"info",displayType:"unstyled",onClick:e=>{e.stopPropagation(),f((e=>!e))},ref:e=>{d.current=e},small:!0,symbol:"merge"})},c.default.createElement("div",null,c.default.createElement("p",{className:"message-info mt-0",dangerouslySetInnerHTML:{__html:Liferay.Language.get("each-page-modification-can-trigger-a-propagation-from-the-site-template-to-the-connected-sites")}}),c.default.createElement(r.default,{button:{small:!0},displayType:"primary",href:e,onClick:()=>{(0,l.openToast)({autoClose:1e4,message:a?Liferay.Language.get("propagation-is-disabled-connected-sites-might-not-have-been-updated-yet-propagation-is-only-triggered-when-a-site-created-from-the-template-is-visited"):s?Liferay.Language.get("propagation-is-enabled-connected-sites-are-being-updated"):Liferay.Language.get("propagation-is-enabled-connected-sites-will-be-updated-once-a-site-page-is-visited"),type:"info"})}},a?Liferay.Language.get("disable-propagation"):Liferay.Language.get("ready-for-propagation"))))};var n=a("@frontend-taglib-clay$clayui/button"),r=u(a("@frontend-taglib-clay$clayui/link")),o=u(a("@frontend-taglib-clay$clayui/popover")),i=a("@liferay/frontend-js-react-web"),l=a("frontend-js-web"),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();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 s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=PropagationMessage.js.map