"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const Portal = require("./Portal.cjs");
function OptionalPortal({ withinPortal = true, children, ...others }) {
  if (withinPortal) {
    return /* @__PURE__ */ jsxRuntime.jsx(Portal.Portal, { ...others, children });
  }
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
}
OptionalPortal.displayName = "@mantine/core/OptionalPortal";
exports.OptionalPortal = OptionalPortal;
