text: "use strict";
  var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
          }
          return t;
      };
      return __assign.apply(this, arguments);
  };
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
      if (k2 === undefined) k2 = k;
      Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  }) : (function(o, m, k, k2) {
      if (k2 === undefined) k2 = k;
      o[k2] = m[k];
  }));
  var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
  }) : function(o, v) {
      o["default"] = v;
  });
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
      __setModuleDefault(result, mod);
      return result;
  };
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Float = void 0;
  var react_1 = __importStar(require("react"));
  var antd_1 = require("antd");
  var Field_1 = __importDefault(require("@/common/Field"));
  var Config_1 = __importDefault(require("@/Config"));
  var FormContext_1 = require("@/context/FormContext");
  var Float = function (props) {
      var ooui = props.ooui;
      var _a = ooui, id = _a.id, decimalDigits = _a.decimalDigits, readOnly = _a.readOnly, required = _a.required;
      var requiredClass = required && !readOnly ? Config_1.default.requiredClass : undefined;
      var formContext = react_1.useContext(FormContext_1.FormContext);
      var elementHasLostFocus = (formContext || {}).elementHasLostFocus;
      return (react_1.default.createElement(Field_1.default, __assign({ required: required, type: "number" }, props),
          react_1.default.createElement(antd_1.InputNumber, { disabled: readOnly, className: "w-full " + requiredClass, id: id, precision: decimalDigits, formatter: function (value) {
                  return ("" + value).replace(/[^0-9\.\-]+/g, "");
              }, defaultValue: 0, decimalSeparator: ".", onBlur: elementHasLostFocus })));
  };
  exports.Float = Float;
  //# sourceMappingURL=Float.js.map