/* eslint-disable no-console */
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import TabularDataTooltip from './tabular-data-tooltip';
import { jsx as _jsx } from "react/jsx-runtime";
const errorMessage = 'Warning: useLayoutEffect does nothing on the server';
export default function StaticTabularDataTooltip(title, rows, {
  testId,
  className,
  footer
} = {}) {
  const consoleError = console.error;
  // This is done to suppress React warnings about useLayoutEffect. It is
  // considered safe here because function is synchronous, and we restore the
  // original function immediately after render.
  console.error = (error, ...args) => {
    if (error && error.includes(errorMessage)) {
      return;
    }
    return consoleError(error, ...args);
  };
  const view = renderToStaticMarkup(/*#__PURE__*/_jsx(TabularDataTooltip, {
    title: title,
    rows: rows,
    testId: testId,
    footer: footer,
    className: className
  }));
  console.error = consoleError;
  return view;
}