/**
 * Canvas3DErrorBoundary
 *
 * Error boundary for 3D canvas components.
 * Catches Three.js and React Three Fiber errors gracefully.
 *
 * @packageDocumentation
 */
import { Component, type ReactNode, type ErrorInfo } from 'react';
import './Canvas3DErrorBoundary.css';
export interface Canvas3DErrorBoundaryProps {
    /** Child components */
    children: ReactNode;
    /** Custom fallback component */
    fallback?: ReactNode;
    /** Error callback */
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    /** Reset callback */
    onReset?: () => void;
}
export interface Canvas3DErrorBoundaryState {
    /** Whether an error has occurred */
    hasError: boolean;
    /** The error that occurred */
    error: Error | null;
    /** Error info from React */
    errorInfo: ErrorInfo | null;
}
/**
 * Canvas3DErrorBoundary Component
 *
 * Catches errors in 3D canvas and displays a user-friendly fallback.
 *
 * @example
 * ```tsx
 * <Canvas3DErrorBoundary
 *     onError={(error) => console.error('3D Error:', error)}
 *     onReset={() => console.log('Resetting...')}
 * >
 *     <GameCanvas3D {...props} />
 * </Canvas3DErrorBoundary>
 * ```
 */
export declare class Canvas3DErrorBoundary extends Component<Canvas3DErrorBoundaryProps, Canvas3DErrorBoundaryState> {
    constructor(props: Canvas3DErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): Canvas3DErrorBoundaryState;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    handleReset: () => void;
    render(): ReactNode;
}
export default Canvas3DErrorBoundary;
