Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.115/designer/js/definition-builder/diagram-builder/components/sidebar/sections/shared-components/BaseSourceCode",["module","exports","require","frontend-editor-ckeditor-web","liferay!frontend-js-react-web$react","../../../../../constants"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=t("frontend-editor-ckeditor-web"),n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache();if(r&&r.has(e))return r.get(e);var t={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(t,n,i):t[n]=e[n]}t.default=e,r&&r.set(e,t);return t}(t("liferay!frontend-js-react-web$react")),i=t("../../../../../constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}var _default=({scriptSourceCode:e,updateSelectedItem:r})=>{const t=(0,n.useRef)();return n.default.createElement(o.Editor,{config:i.editorConfig,onInstanceReady:({editor:t})=>(t.setMode("source"),e&&t.setData(e[0]),document.querySelector("div.sidebar-body").addEventListener("keyup",(()=>{r(t)})),()=>{document.querySelector("div.sidebar-body").removeEventListener("keyup",r(t))}),ref:t})};r.default=_default}}));
//# sourceMappingURL=BaseSourceCode.js.map