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