"use strict";

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

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

var _index = require("../index");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const addTextAndPropsToStrings = (children, props) => {
  const childArray = _react.default.Children.map(children, child => {
    if (typeof child === 'string') {
      return /*#__PURE__*/_react.default.createElement(_index.Text, props, child);
    } else {
      if (!child) {
        return null;
      }

      return /*#__PURE__*/_react.default.cloneElement(child, { ...props,
        ...child.props
      });
    }
  });

  return childArray;
};

exports.addTextAndPropsToStrings = addTextAndPropsToStrings;
//# sourceMappingURL=addTextAndPropsToStrings.js.map