Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.84/admin/js/components/ModalObjectRestrictionsBody",["module","exports","require","@frontend-taglib-clay$clayui/panel","data-engine-js-components-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=d(a("@frontend-taglib-clay$clayui/panel")),n=a("data-engine-js-components-web"),i=d(a("liferay!frontend-js-react-web$react"));function d(e){return e&&e.__esModule?e:{default:e}}const e=({children:e,description:t,title:a})=>i.default.createElement(i.default.Fragment,null,i.default.createElement("p",null,a),i.default.createElement(l.default,{displayTitle:t,displayType:"secondary"},i.default.createElement(l.default.Body,null,e))),f=({fields:t})=>{const a=[Liferay.Language.get("checkbox-multiple-field-type-label"),Liferay.Language.get("color-field-type-label"),Liferay.Language.get("grid-field-type-label"),Liferay.Language.get("radio-field-type-label"),Liferay.Language.get("rich-text-field-type-label"),Liferay.Language.get("select-field-type-label"),Liferay.Language.get("text-field-type-label")],l=Liferay.Language.get("decimal-number"),d=Liferay.Language.get("image-field-type-label"),r=Liferay.Language.get("integer-number"),f={bigdecimal:l,blob:d,double:l,integer:r,long:r,string:a},u=(0,n.getFieldsGroupedByTypes)(t);return i.default.createElement(e,{description:Liferay.Language.get("unmapped-object-required-fields"),title:Liferay.Language.get("to-save-this-form-all-required-fields-of-the-selected-object-need-to-be-mapped")},u.map((({fields:e,type:t})=>{const a=f[t.toLowerCase()];return i.default.createElement("div",{key:t},i.default.createElement("strong",{className:"text-capitalize"},t),a&&i.default.createElement("span",{className:"text-muted"}," (".concat(Array.isArray(a)?a.join(", "):a,")")),i.default.createElement("ol",null,e.map((({label:e,name:t})=>i.default.createElement("li",{key:t},e[themeDisplay.getDefaultLanguageId()])))))})))},u=({fields:t})=>{const a=(0,n.getFieldsGroupedByTypes)(t);return i.default.createElement(e,{description:Liferay.Language.get("unmapped-form-fields"),title:Liferay.Language.get("all-fields-in-this-form-must-be-mapped-to-a-field-in-the-object")},a.map((({fields:e,type:t})=>i.default.createElement("div",{key:t},i.default.createElement("strong",{className:"text-capitalize"},t),i.default.createElement("ol",null,e.map((({fieldName:e,label:t})=>i.default.createElement("li",{key:e},t))))))))};var r=({unmappedFormFields:e,unmappedRequiredObjectFields:t})=>i.default.createElement(i.default.Fragment,null,!!t.length&&i.default.createElement(f,{fields:t}),!!e.length&&i.default.createElement(u,{fields:e}));t.default=r}}));
//# sourceMappingURL=ModalObjectRestrictionsBody.js.map