Liferay.Loader.define("data-engine-taglib@3.3.53/data_layout_builder/js/drag-and-drop/DragLayer.es",["module","exports","require","liferay!frontend-js-react-web$react","liferay!frontend-js-react-web$react-dnd"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("liferay!frontend-js-react-web$react")),i=r("liferay!frontend-js-react-web$react-dnd");function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e={cursor:"grabbing",height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:150};function getItemStyles(e,t){if(!e||!t)return{display:"none"};const{x:r,y:n}=t,i="translate(".concat(r,"px, ").concat(n,"px)");return{WebkitTransform:i,transform:i}}var _default=()=>{const{currentOffset:t,initialOffset:r,isDragging:o,item:a}=(0,i.useDragLayer)((e=>({currentOffset:e.getSourceClientOffset(),initialOffset:e.getInitialSourceClientOffset(),isDragging:e.isDragging(),item:e.getItem(),itemType:e.getItemType()})));if(!o)return null;const{preview:c}=a;return n.default.createElement("div",{style:_objectSpread(_objectSpread({},e),{},{zIndex:200})},n.default.createElement("div",{style:getItemStyles(r,t)},c&&c()))};t.default=_default}}));
//# sourceMappingURL=DragLayer.es.js.map