'use strict';

exports.__esModule = true;

var _react = require('react');

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _helper = require('./Shared/helper.js');

var _CPopperContent = require('./CPopperContent');

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

//component - CoreUI / CPopperTargetHelper

var CPopperTargetHelper = function CPopperTargetHelper(props) {

  var context = (0, _react.useContext)(_CPopperContent.Context);

  //render

  context.popperManager.setTargetNode((0, _helper.getTarget)(props.target));
  return null;
};

CPopperTargetHelper.propTypes = {
  target: _helper.targetPropType.isRequired
};

exports.default = CPopperTargetHelper;
module.exports = exports['default'];