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