/**
 * React-Compatible Error Handling Adapter for Shared Utilities
 *
 * This file provides a React-compatible error handling implementation
 * that uses the shared error utilities from @bluefly/llmcli/shared.
 */
import React from 'react';
import { createError, ERROR_CODES, errorUtils, BlueflyError } from '@bluefly/llmcli/shared';
export { createError, ERROR_CODES, errorUtils };
/**
 * React-specific error codes that extend shared error codes
 */
export declare const UI_ERROR_CODES: any;
/**
 * React UI error with enhanced properties
 */
export declare class UIError extends Error {
    code: string;
    statusCode?: number;
    component?: string;
    details?: Record<string, any>;
    props?: Record<string, any>;
    state?: Record<string, any>;
    constructor(options: {
        message: string;
        code?: string;
        statusCode?: number;
        component?: string;
        details?: Record<string, any>;
        props?: Record<string, any>;
        state?: Record<string, any>;
    });
    /**
     * Convert to BlueflyError
     */
    toBlueflyError(): BlueflyError;
}
/**
 * Create a component error
 */
export declare function createComponentError(message: string, component: string, options?: {
    code?: string;
    props?: Record<string, any>;
    state?: Record<string, any>;
    details?: Record<string, any>;
}): UIError;
/**
 * Error boundary component for React applications
 */
interface ErrorBoundaryProps {
    fallback?: React.ReactNode | ((error: UIError) => React.ReactNode);
    onError?: (error: UIError, errorInfo: React.ErrorInfo) => void;
    children: React.ReactNode;
}
interface ErrorBoundaryState {
    hasError: boolean;
    error: UIError | null;
}
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): ErrorBoundaryState;
    componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
    render(): React.ReactNode;
}
/**
 * Custom hook for error handling
 */
export declare function useErrorHandler(): {
    handleError: (error: any, component?: string) => UIError;
    throwError: (message: string, options?: Record<string, any>) => never;
};
declare const _default: {
    UIError: typeof UIError;
    ErrorBoundary: typeof ErrorBoundary;
    createComponentError: typeof createComponentError;
    useErrorHandler: typeof useErrorHandler;
    UI_ERROR_CODES: any;
};
export default _default;
//# sourceMappingURL=error-adapter.d.ts.map