Liferay.Loader.define("data-engine-js-components-web@1.0.107/js/core/components/Placeholder.es",["module","exports","require","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../hooks/useDrop.es","./Field/ParentFieldContext.es","./KeyboardDNDContext"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.Placeholder=function Placeholder({columnIndex:e,isRow:t,keyboardDNDPosition:r,pageIndex:u,rowIndex:c,size:s}){var f;const p=(0,a.useContext)(d.ParentFieldContext),y=(0,a.useRef)(null),{canDrop:m,drop:g,overTarget:v}=(0,l.useDrop)({columnIndex:null!=e?e:0,origin:l.DND_ORIGIN_TYPE.EMPTY,pageIndex:u,parentField:p,rowIndex:c}),b=(0,i.useIsOverTarget)(r.itemPath,r.position);(0,a.useEffect)((()=>{b&&y.current&&y.current.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}),[b]);const w=a.default.createElement(n.default.Col,{className:"col col-ddm col-empty","data-ddm-field-column":e,"data-ddm-field-page":u,"data-ddm-field-row":c,md:s},a.default.createElement("div",{className:(0,o.default)("ddm-target",{"target-over targetOver":v&&m&&!(null===(f=p.root)||void 0===f?void 0:f.ddmStructureId)||b}),ref:e=>{var t;!(null===(t=p.root)||void 0===t?void 0:t.ddmStructureId)&&g&&g(e),y.current=e}}));if(t)return a.default.createElement("div",{className:"placeholder row"},w);return w};var n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/layout")),o=_interopRequireDefault(r("liferay!frontend-js-react-web$classnames")),a=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")),l=r("../hooks/useDrop.es"),d=r("./Field/ParentFieldContext.es"),i=r("./KeyboardDNDContext");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}}}}));
//# sourceMappingURL=Placeholder.es.js.map