import { LogLevel } from '@/enums';

export const LOG_MAX_ENTRIES = 500;

export const LOG_LEVEL_COLORS: Record<LogLevel, string> = {
  [LogLevel.DEBUG]:
    'bg-gray-100 text-gray-800 border-gray-200 dark:bg-gray-900/30 dark:text-gray-400 dark:border-gray-800',
  [LogLevel.INFO]:
    'bg-blue-100 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-400 dark:border-blue-800',
  [LogLevel.WARN]:
    'bg-yellow-100 text-yellow-800 border-yellow-200 dark:bg-yellow-900/30 dark:text-yellow-400 dark:border-yellow-800',
  [LogLevel.ERROR]:
    'bg-red-100 text-red-800 border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800',
};

export const SERVER_LOG_STATS_TOP_SERVICES_LIMIT = 5;

export const CLIENT_LOG_STATS_TOP_ITEMS_LIMIT = 5;

export const LOG_SENSITIVE_KEYS: ReadonlyArray<string> = [
  'password',
  'token',
  'secret',
  'apiKey',
  'accessToken',
  'refreshToken',
  'authorization',
] as const;
