import { jsx } from "react/jsx-runtime";
import { createPortal } from "react-dom";
function Portal({
  children,
  container,
  className,
  style,
  "data-testid": dataTestId
}) {
  if (!container) return null;
  const content = className != null || style != null || dataTestId != null ? /* @__PURE__ */ jsx("div", { className, "data-testid": dataTestId, style, children }) : children;
  return createPortal(content, container);
}
Portal.displayName = "Portal";
export {
  Portal
};
