Liferay.Loader.define("portal-search-ranking-web@3.0.53/js/components/list/ItemDragLayer.es",["module","exports","require","liferay!frontend-js-react-web$react","liferay!frontend-js-react-web$react-dnd","../../utils/drag-types.es","./ItemDragPreview.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(r("liferay!frontend-js-react-web$react")),a=r("liferay!frontend-js-react-web$react-dnd"),i=_interopRequireDefault(r("../../utils/drag-types.es")),l=_interopRequireDefault(r("./ItemDragPreview.es"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const e={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},s=8,o=16;function getItemStyles(e){const{currentOffset:t,initialOffset:r}=e,{x:n,y:a}=t||{},i="translate(".concat(n-s,"px, ").concat(a-o,"px)");return r&&t?{WebkitTransform:i,transform:i}:{display:"none"}}const ItemDragLayer=t=>{const{dragging:r,item:a,itemType:f}=t;return r?n.default.createElement("div",{className:"drag-layer",style:e},n.default.createElement("div",{style:getItemStyles(t)},function renderItem(){return f===i.default.LIST_ITEM?n.default.createElement(l.default,a):null}())):null};var f=(0,a.DragLayer)((e=>({currentOffset:e.getSourceClientOffset(),dragging:e.isDragging(),initialOffset:e.getInitialSourceClientOffset(),item:e.getItem(),itemType:e.getItemType()})))(ItemDragLayer);t.default=f}}));
//# sourceMappingURL=ItemDragLayer.es.js.map