"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.VisibilityTrackedCard = void 0;
var _react = _interopRequireDefault(require("react"));
var _useIntersectionObserver = require("../../hooks/useIntersectionObserver");
const VisibilityTrackedCard = ({
  itemKey,
  element,
  onObserved
}) => {
  const {
    elementRef
  } = (0, _useIntersectionObserver.useIntersectionObserver)(onObserved);
  return /*#__PURE__*/_react.default.cloneElement(element, {
    key: itemKey,
    ref: elementRef
  });
};
exports.VisibilityTrackedCard = VisibilityTrackedCard;
//# sourceMappingURL=VisibilityTrackedCard.js.map