Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.145/page_editor/app/utils/drag-and-drop/checkAllowedChild",["module","exports","require","../../config/constants/fragmentEntryTypes","../../config/constants/layoutDataItemTypes","../formIsMapped","../hasFormParent","../isUnmappedCollection"],(function(T,_,A){window;{Object.defineProperty(_,"__esModule",{value:!0}),_.default=function checkAllowedChild(_,A,t){if((0,n.isUnmappedCollection)(A)||function isUnmappedForm(T){return T.type===E.LAYOUT_DATA_ITEM_TYPES.form&&!(0,o.formIsMapped)(T)}(A))return!1;if(_.type===E.LAYOUT_DATA_ITEM_TYPES.fragment){if(_.fragmentEntryType===e.FRAGMENT_ENTRY_TYPES.input&&!(0,Y.hasFormParent)(A,t.current))return!1;if(A.type===E.LAYOUT_DATA_ITEM_TYPES.form&&_.isWidget)return!1}return T[A.type](_,A)};var e=A("../../config/constants/fragmentEntryTypes"),E=A("../../config/constants/layoutDataItemTypes"),o=A("../formIsMapped"),Y=A("../hasFormParent"),n=A("../isUnmappedCollection");const T={[E.LAYOUT_DATA_ITEM_TYPES.root]:T=>[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.dropZone,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment,E.LAYOUT_DATA_ITEM_TYPES.form].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.collection]:()=>!1,[E.LAYOUT_DATA_ITEM_TYPES.collectionItem]:T=>[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.dropZone]:()=>!1,[E.LAYOUT_DATA_ITEM_TYPES.container]:T=>[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.dropZone,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment,E.LAYOUT_DATA_ITEM_TYPES.form].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.form]:(T,_)=>!!(0,o.formIsMapped)(_)&&[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.dropZone,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.row]:T=>[E.LAYOUT_DATA_ITEM_TYPES.column].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.column]:T=>[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.dropZone,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment,E.LAYOUT_DATA_ITEM_TYPES.form].includes(T.type),[E.LAYOUT_DATA_ITEM_TYPES.fragment]:()=>!1,[E.LAYOUT_DATA_ITEM_TYPES.fragmentDropZone]:T=>[E.LAYOUT_DATA_ITEM_TYPES.collection,E.LAYOUT_DATA_ITEM_TYPES.dropZone,E.LAYOUT_DATA_ITEM_TYPES.container,E.LAYOUT_DATA_ITEM_TYPES.row,E.LAYOUT_DATA_ITEM_TYPES.fragment,E.LAYOUT_DATA_ITEM_TYPES.form].includes(T.type)}}}));
//# sourceMappingURL=checkAllowedChild.js.map