"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 _withMask = require("./with-mask");

// import Input from './components/input';
// eslint-disable-next-line react/display-name
var _default = (0, _withMask.withMask)('input', function (props) {
  return function (node, data, onChange) {
    var dataset = node.data ? node.data.dataset || {} : {};

    if (dataset.component === 'input') {
      // eslint-disable-next-line react/prop-types
      // const { adjustedLimit, disabled, feedback, showCorrectAnswer, maxLength, spellCheck } = props;
      // the first answer is the correct one
      // eslint-disable-next-line react/prop-types
      // const correctAnswer = ((props.choices && dataset && props.choices[dataset.id]) || [])[0];
      // const finalValue = showCorrectAnswer ? correctAnswer && correctAnswer.label : data[dataset.id] || '';
      // const width = maxLength && maxLength[dataset.id];
      return props.customMarkMarkupComponent(dataset.id); // return (
      //   <Input
      //     key={`${node.type}-input-${dataset.id}`}
      //     correct={feedback && feedback[dataset.id] && feedback[dataset.id] === 'correct'}
      //     disabled={showCorrectAnswer || disabled}
      //     value={finalValue}
      //     id={dataset.id}
      //     onChange={onChange}
      //     showCorrectAnswer={showCorrectAnswer}
      //     width={width}
      //     charactersLimit={adjustedLimit ? width : 25}
      //     isConstructedResponse={true}
      //     spellCheck={spellCheck}
      //   />
      // );
    }
  };
});

exports["default"] = _default;
//# sourceMappingURL=customizable.js.map