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