Liferay.Loader.define("layout-admin-web@5.0.69/js/miller_columns/DragPreview",["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=function({rtl:t}){const r=(0,n.useRef)(),{currentOffset:a,isDragging:f,items:l}=(0,i.useDragLayer)((e=>{var t;return{currentOffset:e.getClientOffset(),isDragging:e.isDragging(),items:null===(t=e.getItem())||void 0===t?void 0:t.items}})),[o,u]=(0,n.useState)();if((0,n.useEffect)((()=>{if(l)if(l.length>1)u(Liferay.Util.sub(Liferay.Language.get("x-elements"),l.length));else{const[e]=l;u(e.title)}}),[l]),!f)return null;return n.default.createElement("div",{className:"miller-columns__drag-preview"},n.default.createElement("div",{className:"miller-columns__drag-preview__content",ref:r,style:e(a,r,t)},o))};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var f=n?Object.getOwnPropertyDescriptor(e,i):null;f&&(f.get||f.set)?Object.defineProperty(r,i,f):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=r("liferay!frontend-js-react-web$react-dnd");function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}const e=(e,t,r)=>{if(!e||!t.current)return{display:"none"};const n=t.current.getBoundingClientRect(),i=r?e.x+.5*n.width-window.innerWidth:e.x-.5*n.width,a=e.y-.5*n.height,f="translate(".concat(i,"px, ").concat(a,"px)");return{WebkitTransform:f,transform:f}}}}));
//# sourceMappingURL=DragPreview.js.map