Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.108/Validation/ValidationTextAndNumeric",["module","exports","require","liferay!frontend-js-react-web$react","../Numeric/Numeric","../Select/Select.es","../Text/Text.es","./validationReducer"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=o(t("liferay!frontend-js-react-web$react")),r=o(t("../Numeric/Numeric")),n=o(t("../Select/Select.es")),i=o(t("../Text/Text.es")),d=t("./validationReducer");function o(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e}).apply(this,arguments)}var c=({append:e,appendType:a,dataType:t,decimalPlaces:o,dispatch:c,errorMessage:u,inputMask:p,inputMaskFormat:m,localizationMode:f,localizedSymbols:g,localizedValue:y,name:E,onBlur:v,parameter:T,readOnly:b,selectedValidation:M,symbols:h,transformSelectedValidation:L,validations:S,visible:_})=>{const O=M&&M.parameterMessage&&"string"===t?i.default:r.default;return l.default.createElement(l.default.Fragment,null,l.default.createElement(n.default,{disableEmptyOption:!0,label:Liferay.Language.get("accept-if-input"),name:"selectedValidation",onChange:(e,a)=>{c({payload:{selectedValidation:L(a)},type:d.EVENT_TYPES.CHANGE_SELECTED_VALIDATION})},options:S,placeholder:Liferay.Language.get("choose-an-option"),readOnly:b||f,showEmptyOption:!1,value:[M.name],visible:_}),M.parameterMessage&&l.default.createElement(O,s({},"string"!==t&&{append:e,appendType:a,decimalPlaces:o,inputMask:p,inputMaskFormat:m,localizedSymbols:g,symbols:h},{dataType:t,label:Liferay.Language.get("value"),name:"".concat(E,"_parameter"),onChange:e=>{let a=e.target.value;if("double"===t){const e=a.match(/[^-\d]/g);a=e?a.replace(e[0],"."):a}c({payload:{parameter:a},type:d.EVENT_TYPES.SET_PARAMETER})},placeholder:M.parameterMessage,readOnly:b,required:!1,value:y(T),visible:_})),l.default.createElement(i.default,{label:Liferay.Language.get("error-message"),name:"".concat(E,"_errorMessage"),onBlur:v,onChange:e=>{c({payload:{errorMessage:e.target.value},type:d.EVENT_TYPES.CHANGE_ERROR_MESSAGE})},placeholder:Liferay.Language.get("this-field-is-invalid"),readOnly:b,required:!1,value:y(u),visible:_}))};a.default=c}}));
//# sourceMappingURL=ValidationTextAndNumeric.js.map