/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import React, { Component, ErrorInfo, ReactNode } from 'react';
interface Props {
    children: ReactNode;
    fallback?: (error: Error, errorInfo: ErrorInfo) => ReactNode;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
}
interface State {
    hasError: boolean;
    error: Error | null;
    errorInfo: ErrorInfo | null;
    errorCount: number;
}
/**
 * Enhanced error boundary that detects and reports React errors,
 * including "Maximum update depth exceeded" errors.
 */
export declare class ErrorBoundary extends Component<Props, State> {
    private errorTimestamps;
    private readonly ERROR_TIME_WINDOW;
    private readonly MAX_ERRORS_IN_WINDOW;
    constructor(props: Props);
    static getDerivedStateFromError(error: Error): Partial<State>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
}
/**
 * Hook to wrap a component with an error boundary.
 *
 * @example
 * ```typescript
 * function MyApp() {
 *   return (
 *     <ErrorBoundary onError={(error, info) => logError(error, info)}>
 *       <App />
 *     </ErrorBoundary>
 *   );
 * }
 * ```
 */
export declare function withErrorBoundary<P extends object>(Component: React.ComponentType<P>, errorBoundaryProps?: Omit<Props, 'children'>): React.ComponentType<P>;
export {};
