Liferay.Loader.define("data-engine-taglib@3.3.50/data_layout_builder/js/plugins/fields-sidebar/components/FieldsSidebarSettingsBody",["module","exports","require","@frontend-taglib-clay$clayui/layout","data-engine-js-components-web","liferay!frontend-js-react-web$react","../../../utils/settingsForm.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function FieldsSidebarSettingsBody({field:e}){const{defaultLanguageId:t,editingLanguageId:r,objectFields:n,pages:l,rules:u}=(0,a.useFormState)(),{submitButtonId:d}=(0,a.useConfig)(),c=(0,a.useForm)(),s=(0,i.useMemo)((()=>getColumn({objectFields:n})),[n]),f=(0,o.useSettingsContextFilter)(e.settingsContext);return i.default.createElement("form",{onSubmit:e=>e.preventDefault()},i.default.createElement(a.FormFieldSettings,_extends({},f,{builderRules:u,defaultLanguageId:t,displayable:!0,editable:!1,editingLanguageId:r,focusedField:e,formBuilder:{pages:l},objectFields:n,onAction:({payload:e,type:t})=>{switch(t){case a.EVENT_TYPES.FIELD.BLUR:case a.EVENT_TYPES.FIELD.CHANGE:c({payload:{propertyName:e.fieldInstance.fieldName,propertyValue:e.value},type:t});break;case a.EVENT_TYPES.FIELD.EVALUATE:c({payload:{settingsContextPages:e},type:t})}},submitButtonId:d}),i.default.createElement(a.Pages,{editable:!1,overrides:_objectSpread({},n&&{Column:s})})))};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("@frontend-taglib-clay$clayui/layout")),a=r("data-engine-js-components-web"),i=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 a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=r("../../../utils/settingsForm.es");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const getColumn=({objectFields:e})=>({children:t,column:r,index:a})=>r.fields.length?i.default.createElement(n.default.Col,{key:a,md:r.size},r.fields.map(((r,n)=>{const{fieldName:a}=r;return!e.length||"repeatable"!==a&&"indexType"!==a?t({field:r,index:n}):i.default.createElement(i.default.Fragment,{key:n})}))):null}}));
//# sourceMappingURL=FieldsSidebarSettingsBody.js.map