Liferay.Loader.define("layout-admin-web@5.0.101/js/miller_columns/MillerColumnsColumn",["module","exports","require","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$react","liferay!frontend-js-react-web$react-dnd","./MillerColumnsItem","./constants"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=f(r("@frontend-taglib-clay$clayui/layout")),o=f(r("liferay!frontend-js-react-web$classnames")),a=r("frontend-js-web"),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),c=r("liferay!frontend-js-react-web$react-dnd"),i=f(r("./MillerColumnsItem")),u=r("./constants");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function d(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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(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=20,b=20,O=20,j=(e,t)=>{const r=t.getClientOffset(),n=e.current.getBoundingClientRect(),o=n.right-(null==r?void 0:r.x);o<O?e.current.scrollLeft+=b:o>n.width-O&&(e.current.scrollLeft-=b)},w=(0,a.throttle)(j,e),v=(e,t)=>!e.some((e=>!(t&&(e.columnIndex>t.columnIndex+1||e.columnIndex===t.columnIndex+1&&e.parentId!==t.id||t.parentable&&e.columnIndex<=t.columnIndex&&!e.active))));var y=({columnItems:e=[],columnsContainer:t,isPrivateLayoutsEnabled:r,items:a,namespace:s,onItemDrop:f,onItemStayHover:d,parent:m,rtl:y})=>{const b=(0,l.useRef)(),[{canDrop:O},j]=(0,c.useDrop)({accept:u.ACCEPTING_TYPES.ITEM,canDrop:(e,t)=>t.isOver({shallow:!0})&&v(e.items,m),collect:e=>({canDrop:!!e.canDrop()}),drop(t){O&&f(t.items,m.id,e.length)},hover(e,r){Liferay.Browser.isSafari()&&!Liferay.Browser.isChrome()&&w(t,r)}});return(0,l.useEffect)((()=>{j(b)}),[j]),l.default.createElement(n.default.Col,{className:(0,o.default)("miller-columns-col show-quick-actions-on-hover",{"drop-target":O}),containerElement:"ul",lg:"4",md:"6",ref:b,size:"11"},e.map(((e,t)=>l.default.createElement(i.default,{isPrivateLayoutsEnabled:r,item:p(p({},e),{},{itemIndex:t}),items:a,key:e.key,namespace:s,onItemDrop:f,onItemStayHover:d,rtl:y}))))};t.default=y}}));
//# sourceMappingURL=MillerColumnsColumn.js.map