Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/topper/TopperEmpty",["module","exports","require","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../../prop-types/index","../../contexts/StoreContext","../../selectors/selectCanUpdatePageStructure","../../utils/drag-and-drop/constants/targetPositions","../../utils/drag-and-drop/useDragAndDrop"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["children"]);return(0,a.useSelector)(c.default)?o.default.createElement(O,r,t):t};var n=p(r("liferay!frontend-js-react-web$classnames")),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();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")),a=(r("../../../prop-types/index"),r("../../contexts/StoreContext")),c=p(r("../../selectors/selectCanUpdatePageStructure")),u=r("../../utils/drag-and-drop/constants/targetPositions"),i=r("../../utils/drag-and-drop/useDragAndDrop");function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function f(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 s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O({children:e,item:t}){const r=(0,o.useRef)(null),{isOverTarget:a,targetPosition:c,targetRef:l}=(0,i.useDropTarget)(t),p=e.type===o.default.Fragment?e.props.children:e,f=(0,i.useDropContainerId)(),d=(0,i.useIsDroppable)()&&a;return o.default.Children.map(p,(e=>e?o.default.createElement(o.default.Fragment,null,o.default.cloneElement(e,s(s({},e.props),{},{className:(0,n.default)(e.props.className,{"drag-over-bottom":d&&c===u.TARGET_POSITIONS.BOTTOM,"drag-over-middle":d&&c===u.TARGET_POSITIONS.MIDDLE,"drag-over-top":d&&c===u.TARGET_POSITIONS.TOP,"drop-container":f===t.itemId,"page-editor__topper":!0}),ref:t=>{r.current=t,l(t),"function"==typeof e.ref?e.ref(t):e.ref&&"current"in e.ref&&(e.ref.current=t)}}))):e))}}}));
//# sourceMappingURL=TopperEmpty.js.map