/**
 * Network Error Boundary Component
 *
 * Specialized error boundary for catching and handling API and network errors.
 * Provides connection status, retry with exponential backoff, and offline mode options.
 */
import React, { Component, ErrorInfo, ReactNode } from 'react';
interface NetworkErrorBoundaryProps {
    children: ReactNode;
    onRetry?: () => void;
    onOfflineMode?: () => void;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    maxRetries?: number;
    showDetails?: boolean;
    apiEndpoint?: string;
}
interface NetworkErrorBoundaryState {
    hasError: boolean;
    error: Error | null;
    errorInfo: ErrorInfo | null;
    retryCount: number;
    isRetrying: boolean;
    connectionStatus: ConnectionStatus;
    nextRetryIn: number;
}
/**
 * Connection status types
 */
export declare enum ConnectionStatus {
    ONLINE = "ONLINE",
    OFFLINE = "OFFLINE",
    DEGRADED = "DEGRADED",
    CHECKING = "CHECKING",
    UNKNOWN = "UNKNOWN"
}
/**
 * Network error types
 */
export declare enum NetworkErrorType {
    CONNECTION_REFUSED = "CONNECTION_REFUSED",
    TIMEOUT = "TIMEOUT",
    DNS_FAILURE = "DNS_FAILURE",
    SSL_ERROR = "SSL_ERROR",
    RATE_LIMIT = "RATE_LIMIT",
    SERVER_ERROR = "SERVER_ERROR",
    CLIENT_ERROR = "CLIENT_ERROR",
    NETWORK_UNREACHABLE = "NETWORK_UNREACHABLE",
    UNKNOWN = "UNKNOWN"
}
/**
 * Network Error Boundary for handling API and network errors
 */
export declare class NetworkErrorBoundary extends Component<NetworkErrorBoundaryProps, NetworkErrorBoundaryState> {
    private retryTimeout;
    private countdownInterval;
    constructor(props: NetworkErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): Partial<NetworkErrorBoundaryState>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    componentWillUnmount(): void;
    scheduleRetry: () => void;
    handleManualRetry: () => void;
    handleOfflineMode: () => void;
    getErrorMessage(): string;
    getConnectionStatusColor(): string;
    render(): ReactNode;
}
/**
 * Hook to wrap components with Network Error Boundary
 */
interface WithNetworkErrorBoundaryOptions {
    onRetry?: () => void;
    onOfflineMode?: () => void;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
    maxRetries?: number;
    showDetails?: boolean;
    apiEndpoint?: string;
}
export declare function withNetworkErrorBoundary<P extends object>(WrappedComponent: React.ComponentType<P>, options?: WithNetworkErrorBoundaryOptions): React.FC<P>;
export default NetworkErrorBoundary;
