Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/selectors/selectFormConfiguration",["module","exports","require","../config/constants/formMappingSources","../config/constants/layoutDataItemTypes","../config/constants/layoutTypes","../config/index"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)return{};const n=e=>{const a=t.items[null==e?void 0:e.parentId];if(!a)return{};if(a.type===r.LAYOUT_DATA_ITEM_TYPES.form){var f,u;const e=null===(f=a.config)||void 0===f?void 0:f.classNameId,t=null===(u=a.config)||void 0===u?void 0:u.formConfig;if(e&&"0"!==e)return s(s({},a.config),{},{formId:a.itemId});if(c.config.layoutType!==i.LAYOUT_TYPES.display||t&&t!==o.FORM_MAPPING_SOURCES.displayPage)return{};{const{selectedMappingTypes:e}=c.config;return{classNameId:null==e?void 0:e.type.id,classTypeId:null==e?void 0:e.subtype.id,formId:a.itemId}}}return n(a)};return n(t.items[e.itemId])};var o=n("../config/constants/formMappingSources"),r=n("../config/constants/layoutDataItemTypes"),i=n("../config/constants/layoutTypes"),c=n("../config/index");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=selectFormConfiguration.js.map