Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/SidebarBody",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../DiagramBuilderContext","../nodes/utils"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var a=(n=r("liferay!frontend-js-react-web$prop-types"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=r("../../DiagramBuilderContext"),l=r("../nodes/utils");function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}const e=(e,t,r)=>{e.dataTransfer.setData("application/reactflow",t),e.dataTransfer.effectAllowed="move";const n=e.target.getBoundingClientRect();r({mouseXInRectangle:e.clientX-n.left,mouseYInRectangle:e.clientY-n.top,rectangleHeight:n.height,rectangleWidth:n.width})};function s({children:t,displayDefaultContent:r=!0}){const{setCollidingElements:n,setElementRectangle:a}=(0,o.useContext)(i.DiagramBuilderContext);return o.default.createElement("div",{className:"sidebar-body"},r?Object.entries(l.nodeTypes).map((([t,r],i)=>o.default.createElement(r,{className:"btn-sm",descriptionSidebar:l.nodeDescription[t],draggable:!0,key:i,onDragEnd:()=>n(null),onDragLeave:()=>n(null),onDragStart:r=>e(r,t,a)}))):t)}s.protoTypes={children:a.default.any,displayDefaultContent:a.default.bool}}}));
//# sourceMappingURL=SidebarBody.js.map