/* index.tsx generated by @compiled/babel-plugin v0.40.0 */
"use strict";

var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StopPropagation = void 0;
require("./index.compiled.css");
var _runtime = require("@compiled/react/runtime");
var _react = _interopRequireWildcard(require("react"));
var _compiled = require("@atlaskit/primitives/compiled");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var styles = {
  wrapper: "_c71lidpf _p12fidpf _kqswstnw"
};
/**
 * A wrapper component that prevents click events from propagating to parent elements.
 *
 * This component is commonly used within modals or overlays to prevent unintended
 * interactions with parent handlers when users interact with nested content.
 *
 */
var StopPropagation = exports.StopPropagation = function StopPropagation(_ref) {
  var children = _ref.children;
  var onClick = (0, _react.useCallback)(function (e) {
    // Prevent click events from bubbling up
    e.stopPropagation();
  }, []);
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
    as: "span",
    role: "none",
    xcss: styles.wrapper,
    onClick: onClick
  }, children);
};