import { isDevelopment } from '../env';
export declare const errorRecovery: ErrorRecovery;
// Global error logger instance
export declare const errorLogger: ErrorLogger;
export declare const devHelpers: DevHelpers;
/**
 * Error recovery strategies
 *
 * NOTE: Auto-recovery is opt-in via configuration.
 * Use configureErrorHandling({ enableAutoRecovery: true }) to enable.
 */
export declare interface ErrorRecovery {
  isEnabled(): boolean
  fixCommonSyntaxErrors(template: string): { fixed: string, fixes: string[] }
  createFallbackContent(sectionType: string, error: Error): string
}
/**
 * Error logger configuration options
 */
export declare interface ErrorLoggerOptions {
  maxErrors?: number
  enableFileLogging?: boolean
  logFilePath?: string
  logFormat?: 'json' | 'text'
  maxFileSize?: number
  maxLogFiles?: number
  minLevel?: 'all' | 'error' | 'warning'
}
/**
 * Error log entry structure
 */
export declare interface ErrorLogEntry {
  timestamp: Date
  error: Error
  context?: unknown
  level?: 'error' | 'warning' | 'info'
}
/**
 * Development mode helpers
 */
export declare interface DevHelpers {
  isDevelopment(): boolean
  logDetailedError(error: Error, context?: unknown): void
  createErrorReport(error: Error, context?: unknown): string
}
/**
 * Error logging and monitoring with optional file persistence
 */
export declare class ErrorLogger {
  constructor(options?: ErrorLoggerOptions);
  configure(options: ErrorLoggerOptions): void;
  log(error: Error, context?: unknown, level?: 'error' | 'warning' | 'info'): void;
  getRecentErrors(limit?: number): ErrorLogEntry[];
  getErrorsByType(errorType: string): ErrorLogEntry[];
  getErrorsByLevel(level: 'error' | 'warning' | 'info'): ErrorLogEntry[];
  clear(): void;
  clearLogFile(): Promise<void>;
  getStats(): { total: number, byType: Record<string, number>, byLevel: Record<string, number> };
  exportToFile(filePath: string, format?: 'json' | 'text'): Promise<void>;
  flush(): Promise<void>;
}
