"use client"; 
// src/next-client.tsx
import { H as localH } from "highlight.run";
import { useEffect } from "react";
import { ErrorBoundary } from "@highlight-run/react";
function HighlightInit({
  excludedHostnames = [],
  projectId,
  ...highlightOptions
}) {
  useEffect(() => {
    const shouldRender = projectId && excludedHostnames.every(
      (hostname) => !window.location.hostname.includes(hostname)
    );
    shouldRender && localH.init(projectId, highlightOptions);
  }, []);
  return null;
}
function getHighlightErrorInitialProps({
  res,
  err
}) {
  const statusCode = res?.statusCode ?? err?.statusCode ?? 500;
  const errorMessage = res?.statusMessage ?? err?.message ?? "An error occurred";
  return { errorMessage, statusCode };
}
export {
  ErrorBoundary,
  localH as H,
  HighlightInit,
  getHighlightErrorInitialProps
};
//# sourceMappingURL=next-client.js.map