"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _classnames = _interopRequireDefault(require("classnames"));
var _titleAndCheckboxWrapper = _interopRequireDefault(require("../../molecule/title-and-checkbox-wrapper"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const RewardsForm = ({
  items
}) => {
  const itemsView = items.map(({
    childType,
    ...item
  }, index) => {
    return /*#__PURE__*/_react.default.createElement("li", {
      key: index,
      className: (0, _classnames.default)(_style.default.item, childType === 'input-text' && _style.default.inputText),
      "data-name": `reward-${index}`
    }, /*#__PURE__*/_react.default.createElement(_titleAndCheckboxWrapper.default, item));
  });
  return /*#__PURE__*/_react.default.createElement("ul", {
    className: _style.default.list
  }, itemsView);
};
RewardsForm.propTypes = process.env.NODE_ENV !== "production" ? {
  items: _propTypes.default.arrayOf(_propTypes.default.shape(_titleAndCheckboxWrapper.default.propTypes))
} : {};
var _default = exports.default = RewardsForm;
//# sourceMappingURL=index.js.map