"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;
}

function _traverse() {
  const data = _interopRequireDefault(require("@babel/traverse"));

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

  return data;
}

var _util = require("../util");

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

var _default = (content, name) => {
  return new Promise(resolve => {
    const ast = (0, _util.parseContent)(content);
    (0, _traverse().default)(ast, {
      Program(path) {
        resolve(path.scope.hasBinding(name));
      }

    });
  });
};

exports.default = _default;