import s from "react";
const l = {
  click: "onClick",
  touchstart: "onTouchStart"
};
function f(a, o) {
  const r = Object.assign({}, o.props);
  for (const i of a) {
    const c = l[i];
    r[c] = function(n) {
      var p, t;
      n.stopPropagation(), (t = (p = o.props)[c]) === null || t === void 0 || t.call(p, n);
    };
  }
  return s.cloneElement(o, r);
}
export {
  f as withStopPropagation
};
