Liferay.Loader.define("layout-admin-web@5.0.105/js/miller_columns/DragPreview",["module","exports","require","frontend-js-web","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,i.useRef)(),{currentOffset:f,isDragging:o,items:l}=(0,a.useDragLayer)((e=>{var t;return{currentOffset:e.getClientOffset(),isDragging:e.isDragging(),items:null===(t=e.getItem())||void 0===t?void 0:t.items}})),[u,s]=(0,i.useState)();if((0,i.useEffect)((()=>{if(l)if(l.length>1)s((0,n.sub)(Liferay.Language.get("x-elements"),l.length));else{const[e]=l;s(e.title)}}),[l]),!o)return null;return i.default.createElement("div",{className:"miller-columns__drag-preview"},i.default.createElement("div",{className:"miller-columns__drag-preview__content",ref:r,style:e(f,r,t)},u))};var n=r("frontend-js-web"),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();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 a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("liferay!frontend-js-react-web$react-dnd");function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=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