"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.Number = void 0;
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _Field = require("../Field");
var _dataHooks = require("../dataHooks");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/fields/Number/Number.tsx";
const Number = ({
  dataHook,
  schema,
  initialValue,
  onChange
}) => {
  return /*#__PURE__*/_react.default.createElement(_Field.Field, {
    dataHook: dataHook,
    type: schema.type,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 16,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.FormField, {
    dataHook: _dataHooks.dataHooks.Label,
    label: schema.label,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 17,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_designSystem.NumberInput, {
    dataHook: _dataHooks.dataHooks.Input,
    defaultValue: initialValue || undefined,
    onChange: e => onChange(e),
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 18,
      columnNumber: 9
    }
  })));
};
exports.Number = Number;
//# sourceMappingURL=Number.js.map