"use strict";

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

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

var _getConstVarsFromPath = _interopRequireDefault(require("./getConstVarsFromPath"));

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

var _default = (content, {
  path
}) => {
  const vars = (0, _getConstVarsFromPath.default)(path);
  const replaceReg = new RegExp(Array.from(vars.keys()).join('|'), 'g');
  return content.replace(replaceReg, match => {
    return vars.get(match);
  });
};

exports.default = _default;