Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/CodeMirrorEditor",["module","exports","require","liferay!layout-content-page-editor-web$codemirror/addon/display/autorefresh","liferay!layout-content-page-editor-web$codemirror/addon/edit/closebrackets","liferay!layout-content-page-editor-web$codemirror/addon/edit/closetag","liferay!layout-content-page-editor-web$codemirror/addon/edit/matchbrackets","liferay!layout-content-page-editor-web$codemirror/addon/fold/brace-fold","liferay!layout-content-page-editor-web$codemirror/addon/fold/comment-fold","liferay!layout-content-page-editor-web$codemirror/addon/fold/foldcode","liferay!layout-content-page-editor-web$codemirror/addon/fold/foldgutter.css","liferay!layout-content-page-editor-web$codemirror/addon/fold/foldgutter","liferay!layout-content-page-editor-web$codemirror/addon/fold/indent-fold","liferay!layout-content-page-editor-web$codemirror/addon/fold/xml-fold","liferay!layout-content-page-editor-web$codemirror/addon/hint/css-hint","liferay!layout-content-page-editor-web$codemirror/addon/hint/html-hint","liferay!layout-content-page-editor-web$codemirror/addon/hint/show-hint.css","liferay!layout-content-page-editor-web$codemirror/addon/hint/show-hint","liferay!layout-content-page-editor-web$codemirror/addon/hint/xml-hint","liferay!layout-content-page-editor-web$codemirror/lib/codemirror.css","liferay!layout-content-page-editor-web$codemirror/mode/css/css","liferay!layout-content-page-editor-web$codemirror/mode/htmlmixed/htmlmixed","liferay!layout-content-page-editor-web$codemirror/mode/xml/xml","liferay!frontend-js-react-web$classnames","liferay!layout-content-page-editor-web$codemirror","liferay!frontend-js-react-web$react"],(function(e,o,t){window;{Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,t("liferay!layout-content-page-editor-web$codemirror/addon/display/autorefresh"),t("liferay!layout-content-page-editor-web$codemirror/addon/edit/closebrackets"),t("liferay!layout-content-page-editor-web$codemirror/addon/edit/closetag"),t("liferay!layout-content-page-editor-web$codemirror/addon/edit/matchbrackets"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/brace-fold"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/comment-fold"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/foldcode"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/foldgutter.css"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/foldgutter"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/indent-fold"),t("liferay!layout-content-page-editor-web$codemirror/addon/fold/xml-fold"),t("liferay!layout-content-page-editor-web$codemirror/addon/hint/css-hint"),t("liferay!layout-content-page-editor-web$codemirror/addon/hint/html-hint"),t("liferay!layout-content-page-editor-web$codemirror/addon/hint/show-hint.css"),t("liferay!layout-content-page-editor-web$codemirror/addon/hint/show-hint"),t("liferay!layout-content-page-editor-web$codemirror/addon/hint/xml-hint"),t("liferay!layout-content-page-editor-web$codemirror/lib/codemirror.css"),t("liferay!layout-content-page-editor-web$codemirror/mode/css/css"),t("liferay!layout-content-page-editor-web$codemirror/mode/htmlmixed/htmlmixed"),t("liferay!layout-content-page-editor-web$codemirror/mode/xml/xml");var r=i(t("liferay!frontend-js-react-web$classnames")),a=i(t("liferay!layout-content-page-editor-web$codemirror")),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n();if(o&&o.has(e))return o.get(e);var t={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var d=r?Object.getOwnPropertyDescriptor(e,a):null;d&&(d.get||d.set)?Object.defineProperty(t,a,d):t[a]=e[a]}t.default=e,o&&o.set(e,t);return t}(t("liferay!frontend-js-react-web$react"));function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}const e=()=>{};var l=({className:o,initialContent:t="",mode:n="text/html",onChange:i=e})=>{const l=(0,d.useRef)();return(0,d.useEffect)((()=>{if(l.current){const e=(0,a.default)(l.current,{autoCloseTags:!0,autoRefresh:!0,extraKeys:{"Ctrl-Space":"autocomplete"},globalVars:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],hintOptions:{completeSingle:!1},lineNumbers:!0,mode:n,showHint:!0,tabSize:2,value:t});e.on("change",(e=>{i(e.getValue())})),e.setSize(null,"100%")}}),[]),d.default.createElement("div",{className:(0,r.default)(o,"h-100"),ref:l})};o.default=l}}));
//# sourceMappingURL=CodeMirrorEditor.js.map