"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _correctInput = _interopRequireDefault(require("./correct-input"));

var Input = function Input(_ref) {
  var disabled = _ref.disabled,
      correct = _ref.correct,
      charactersLimit = _ref.charactersLimit,
      id = _ref.id,
      isConstructedResponse = _ref.isConstructedResponse,
      value = _ref.value,
      _onChange = _ref.onChange,
      showCorrectAnswer = _ref.showCorrectAnswer,
      spellCheck = _ref.spellCheck,
      width = _ref.width;
  return /*#__PURE__*/_react["default"].createElement(_correctInput["default"], {
    disabled: disabled,
    correct: showCorrectAnswer || correct,
    charactersLimit: charactersLimit,
    variant: "outlined",
    value: value,
    isConstructedResponse: isConstructedResponse,
    spellCheck: spellCheck,
    isBox: true,
    width: width,
    onChange: function onChange(e) {
      _onChange(id, e.target.value);
    }
  });
};

Input.propTypes = {
  id: _propTypes["default"].string,
  value: _propTypes["default"].string,
  onChange: _propTypes["default"].func,
  disabled: _propTypes["default"].bool,
  spellCheck: _propTypes["default"].bool,
  correct: _propTypes["default"].bool,
  showCorrectAnswer: _propTypes["default"].bool,
  charactersLimit: _propTypes["default"].number,
  width: _propTypes["default"].number,
  isConstructedResponse: _propTypes["default"].bool
};
var _default = Input;
exports["default"] = _default;
//# sourceMappingURL=input.js.map