Liferay.Loader.define("layout-admin-web@5.0.150/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=_interopRequireDefault(r("@frontend-taglib-clay$clayui/layout")),o=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),a=r("frontend-js-web"),l=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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")),i=r("liferay!frontend-js-react-web$react-dnd"),c=_interopRequireDefault(r("./MillerColumnsItem")),u=r("./constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}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=20,s=20,f=20,scroll=(e,t)=>{const r=t.getClientOffset(),n=e.current.getBoundingClientRect(),o=n.right-(null==r?void 0:r.x);o<f?e.current.scrollLeft+=s:o>n.width-f&&(e.current.scrollLeft-=s)},d=(0,a.throttle)(scroll,e),isValidTarget=(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 _default=({columnItems:e=[],columnsContainer:t,isLayoutSetPrototype:r,isPrivateLayoutsEnabled:a,items:s,namespace:f,onItemDrop:p,onItemStayHover:y,parent:m,rtl:b})=>{const j=(0,l.useRef)(),[{canDrop:w},O]=(0,i.useDrop)({accept:u.ACCEPTING_TYPES.ITEM,canDrop:(e,t)=>t.isOver({shallow:!0})&&isValidTarget(e.items,m),collect:e=>({canDrop:!!e.canDrop()}),drop(t){w&&p(t.items,m.id,e.length)},hover(e,r){Liferay.Browser.isSafari()&&!Liferay.Browser.isChrome()&&d(t,r)}});return(0,l.useEffect)((()=>{O(j)}),[O]),l.default.createElement(n.default.Col,{className:(0,o.default)("miller-columns-col show-quick-actions-on-hover",{"drop-target":w}),containerElement:"ul",lg:"4",md:"6",ref:j,size:"11"},e.map(((e,t)=>l.default.createElement(c.default,{isLayoutSetPrototype:r,isPrivateLayoutsEnabled:a,item:_objectSpread(_objectSpread({},e),{},{itemIndex:t}),items:s,key:e.key,namespace:f,onItemDrop:p,onItemStayHover:y,rtl:b}))))};t.default=_default}}));
//# sourceMappingURL=MillerColumnsColumn.js.map