Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectField/Tabs/BasicInfo/FormulaContainer",["module","exports","require","@liferay/object-js-components-web","liferay!frontend-js-react-web$react"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.FormulaContainer=function FormulaContainer({errors:e,objectFieldSettings:a,setValues:t}){var l;const n=null==a?void 0:a.find((e=>"script"===e.name));return o.default.createElement(r.Card,{title:Liferay.Language.get("formula")},o.default.createElement(r.ExpressionBuilder,{error:e.script,feedbackMessage:Liferay.Language.get("use-expressions-to-create-a-condition"),label:Liferay.Language.get("formula-builder"),onChange:({target:{value:e}})=>{t({objectFieldSettings:getNewObjectFieldSettings(a,e)})},onOpenModal:()=>{var e;Liferay.Util.getOpener().Liferay.fire("openExpressionBuilderModal",{header:Liferay.Language.get("formula-builder"),onSave:e=>{t({objectFieldSettings:getNewObjectFieldSettings(a,e)})},placeholder:"<#-- ".concat(Liferay.Util.sub(Liferay.Language.get("add-formulas-to-calculate-values-based-on-other-fields-type-x-to-use-the-autocomplete-feature"),['"${"'])," --\x3e"),required:!1,source:null!==(e=null==n?void 0:n.value)&&void 0!==e?e:"",validateExpressionURL:""})},placeholder:"".concat(Liferay.Util.sub(Liferay.Language.get("type-x-to-use-the-autocomplete-feature"),['"${"'])),value:null!==(l=null==n?void 0:n.value)&&void 0!==l?l:""}))};var r=t("@liferay/object-js-components-web"),o=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(t("liferay!frontend-js-react-web$react"));const getNewObjectFieldSettings=(e,a)=>[...null==e?void 0:e.filter((e=>"script"!==e.name)),{name:"script",value:a}]}}));
//# sourceMappingURL=FormulaContainer.js.map