import { ErrorPageInfo } from '../services'; import { ApiCallInfo, ApiRecoveryReason } from '../types'; export type UuiRecoveryErrorInfo = { title: string; subtitle: string; }; export type ApiCallErrorType = 'permissionDenied' | 'notFound' | 'serverError' | 'serviceUnavailable' | 'default'; export interface UseUuiErrorOptions { /** Config with information which data will be displayed in case of particular API error. * If omitted, default config will be used. * */ errorConfig?: Record; /** Config with information which data will be displayed in case recovery errors. * If omitted, default config will be used. * */ recoveryConfig?: Record; } export interface UseUuiErrorProps { /** Pure function to get error info for display based on error. * If omitted, error info from default config or options.errorConfig will be used. */ getErrorInfo: (error: any, defaultErrorInfo: ErrorPageInfo) => ErrorPageInfo; /** Error handling options */ options?: UseUuiErrorOptions; } export declare const useUuiError: (props: UseUuiErrorProps) => { errorType: string; errorInfo: ErrorPageInfo; } | { errorType: string; errorInfo: ApiCallInfo[]; } | { errorType: string; errorInfo: UuiRecoveryErrorInfo; }; //# sourceMappingURL=useUuiError.d.ts.map