"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.elementType = exports.name = exports["default"] = void 0;

var _reactIntl = require("react-intl");

var _default = function _default(_ref) {
  var _ref$config = _ref.config,
      defaultValue = _ref$config.numberDefault,
      maximum = _ref$config.maximum,
      minimum = _ref$config.minimum,
      multipleOf = _ref$config.multipleOf,
      numberOfDecimals = _ref$config.numberOfDecimals;
  return {
    schema: {
      "default": defaultValue < minimum || defaultValue > maximum ? undefined : defaultValue !== null && defaultValue !== void 0 ? defaultValue : undefined,
      maximum: maximum,
      minimum: minimum,
      multipleOf: multipleOf,
      type: ['number', 'null'],
      allowedCharacters: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '.'],
      numberOfDecimals: numberOfDecimals
    }
  };
};

exports["default"] = _default;
var name = (0, _reactIntl.defineMessage)({
  id: "H98CMI",
  defaultMessage: [{
    "type": 0,
    "value": "Numero"
  }]
});
exports.name = name;
var elementType = 'field';
exports.elementType = elementType;
//# sourceMappingURL=number.cjs.map