Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/page_editor/app/components/ZoomAlert",["module","exports","require","@frontend-taglib-clay$clayui/alert","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ZoomAlert(){const[e,t]=(0,o.useState)(!1),r=(0,o.useRef)();return(0,o.useEffect)((()=>{const onChange=e=>{t(e.matches)},e=window.matchMedia("(max-width: 576px)");return e.matches&&t(!0),e.addEventListener("change",onChange),()=>e.removeEventListener("change",onChange)}),[]),(0,o.useEffect)((()=>{if(e){var t;const e=null===(t=r.current)||void 0===t?void 0:t.getBoundingClientRect().height;document.body.style.setProperty("--zoom-alert-height","".concat(e,"px"))}else document.body.style.setProperty("--zoom-alert-height","0px")}),[e]),e&&o.default.createElement("div",{className:"p-2 page-editor__resolution-info-alert w-100",ref:r},o.default.createElement(n.default,{className:"mb-0",displayType:"info",onClose:()=>t(!1)},Liferay.Language.get("this-editor-is-not-optimized-for-mobile-or-400-zooming")))};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("@frontend-taglib-clay$clayui/alert")),o=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 r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("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}}}));
//# sourceMappingURL=ZoomAlert.js.map