Liferay.Loader.define("product-navigation-control-menu@6.0.52/js/DragAndDrop",["module","exports","require","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$react","./useDragAndDrop"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r("@liferay/frontend-js-react-web"),n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();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 a=o?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("./useDragAndDrop");function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}const e=()=>{const[e,t]=(0,n.useState)({}),[r,l]=(0,n.useState)(null),[u,f]=(0,n.useState)(null),s=r&&!r.firstElementChild.classList.contains("empty"),p=Array.from(document.querySelectorAll(".portlet-dropzone, .portlet-dropzone .portlet-boundary")),y=document.body;return n.default.createElement(a.DragAndDropProvider,{value:{dragIndicatorPosition:e,dropTargetColumn:r,dropTargetItem:u,setDragIndicatorPosition:t,setDropTargetColumn:l,setDropTargetItem:f}},s&&n.default.createElement(o.ReactPortal,null,n.default.createElement(i,{position:e})),p.map(((e,t)=>n.default.createElement(d,{dropItem:e,key:t}))),n.default.createElement(c,{item:y}))},i=({position:e})=>n.default.createElement("div",{className:"sortable-layout-drag-indicator sortable-layout-drag-target-indicator",style:{left:e.clientX,top:e.clientY,width:e.width}}),d=({dropItem:e})=>((0,a.useDropTarget)(e),null),c=({item:e})=>((0,a.useDropClear)(e),null);var u=e;t.default=u}}));
//# sourceMappingURL=DragAndDrop.js.map