/**
 * Error Boundary Component for Ink/React
 *
 * Catches JavaScript errors in child components and displays
 * a fallback UI instead of crashing the entire CLI.
 *
 * Based on React error boundary pattern adapted for terminal UI.
 */
import React, { Component, ErrorInfo, ReactNode } from 'react';
interface ErrorBoundaryProps {
    children: ReactNode;
    fallback?: ReactNode;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    showDetails?: boolean;
}
interface ErrorBoundaryState {
    hasError: boolean;
    error: Error | null;
    errorInfo: ErrorInfo | null;
}
/**
 * Error Boundary for Ink components
 * Prevents the entire CLI from crashing on component errors
 */
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    render(): ReactNode;
}
/**
 * Hook-based error boundary wrapper for functional components
 */
interface WithErrorBoundaryOptions {
    fallback?: ReactNode;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    showDetails?: boolean;
}
export declare function withErrorBoundary<P extends object>(WrappedComponent: React.ComponentType<P>, options?: WithErrorBoundaryOptions): React.FC<P>;
/**
 * Specialized error boundary for streaming content
 */
export declare class StreamingErrorBoundary extends Component<ErrorBoundaryProps & {
    retryCount?: number;
}, ErrorBoundaryState & {
    retries: number;
}> {
    constructor(props: ErrorBoundaryProps & {
        retryCount?: number;
    });
    static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    handleRetry: () => void;
    render(): ReactNode;
}
export default ErrorBoundary;
