// Generated with util/create-component.js
import React from "react";
import classnames from "classnames";
import ReactDOM from "react-dom";
import { jsx as _jsx } from "react/jsx-runtime";
const globalDocument = typeof document === "undefined" ? undefined : document;
export const Portal = props => {
  const {
    id,
    visible = false,
    children,
    className,
    ...otherProps
  } = props;
  if (!visible || !globalDocument) return null;
  return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/_jsx("div", {
    id: id,
    "data-testid": "Wps-Portal",
    className: classnames("Wps-Portal", className),
    ...otherProps,
    children: children
  }), document.body);
};
export default Portal;