export const ITEMS_PER_PAGE = 25

// SSIM threshold for screenshot similarity (0-1, where 1 is identical)
// Values above this threshold are considered "similar enough" to filter out
export const SSIM_SIMILARITY_THRESHOLD = 0.95

// Global highlighting constants
export const HIGHLIGHTING_CONFIG = {
  // File size thresholds (in KB)
  SIZE_THRESHOLDS: {
    LARGE: 500,    // Red highlighting for files >= 500KB
    MEDIUM: 100,   // Yellow highlighting for files >= 100KB  
    SMALL: 50      // Green highlighting for files <= 50KB
  },
  
  // Duration thresholds (in milliseconds)
  DURATION_THRESHOLDS: {
    SLOW: 350,     // Red highlighting for requests > 150ms
    MEDIUM: 200,    // Yellow highlighting for requests 50-150ms
    FAST: 200       // Green highlighting for requests < 50ms
  },
  
  // Total Response Time thresholds (in milliseconds)
  TOTAL_RESPONSE_TIME_THRESHOLDS: {
    FAST: 100,     // Green highlighting for total response < 100ms
    MEDIUM: 200,   // Yellow highlighting for total response 100-200ms
    SLOW: 200      // Red highlighting for total response > 200ms
  },
  
  // Server latency thresholds (in microseconds)
  SERVER_LATENCY_THRESHOLDS: {
    SLOW: 250000,   // Red highlighting for server latency > 200ms (200000 microseconds)
    MEDIUM: 100000,  // Yellow highlighting for server latency 50-200ms (50000 microseconds)
    FAST: 100000     // Green highlighting for server latency < 50ms (50000 microseconds)
  },
  
  // Queue time thresholds (in microseconds)
  QUEUE_TIME: {
    HIGH_THRESHOLD: 10000,  // 10ms - highlight in red and show analysis
    ANALYSIS_THRESHOLD: 10000  // 10ms - minimum queue time for analysis
  },
  
  // Colors
  COLORS: {
    // Status colors
    STATUS: {
      SUCCESS: '#28a745',    // 2xx
      REDIRECT: '#ffc107',   // 3xx  
      CLIENT_ERROR: '#fd7e14', // 4xx
      SERVER_ERROR: '#dc3545', // 5xx
      UNKNOWN: '#6c757d'
    },
    
    // Protocol colors
    PROTOCOL: {
      HTTP1_1: '#dc3545',    // Red
      H2: '#b8860b',         // Dark yellow
      H3: '#006400',         // Dark green
      UNKNOWN: '#6c757d'
    },
    
    // Priority colors
    PRIORITY: {
      VERY_HIGH: '#dc3545',  // Red
      HIGH: '#fd7e14',       // Orange
      MEDIUM: '#ffc107',     // Yellow
      LOW: '#28a745',        // Green
      VERY_LOW: '#6c757d',   // Gray
      UNKNOWN: '#6c757d'
    },
    //background:
    //     color: var(--color-danger);
    //
    // File size colors
    SIZE: {
      LARGE: { background: 'var(--color-bg-danger)', color: 'var(--color-danger)'},      // Red for 500KB+
      MEDIUM: { background: 'var(--color-bg-warning)', color: 'var(--color-warning)' },     // Yellow for 100-500KB
      SMALL: { background: 'var(--color-bg)', color: 'var(--color-success)' },      // Green for under 50KB
      DEFAULT: { background: 'transparent', color: '#495057' } // Default for 50-100KB
    },
    
    // Duration colors
    DURATION: {
      SLOW: { background: 'var(--color-bg-danger)', color: 'var(--color-danger)'},       // Red for > 150ms
      MEDIUM: { background: 'var(--color-bg-warning)', color: 'var(--color-warning)' },     // Yellow for 50-150ms
      FAST: { background: 'var(--color-bg)', color: 'var(--color-success)' },       // Green for < 50ms
      DEFAULT: { background: 'transparent', color: '#495057' } // Default
    },
    
    // Server latency colors
    SERVER_LATENCY: {
      SLOW: { background: '#dc3545', color: 'white' },       // Red for > 200ms
      MEDIUM: { background: '#ffc107', color: 'black' },     // Yellow for 50-200ms
      FAST: { background: '#28a745', color: 'white' },       // Green for < 50ms
      DEFAULT: { background: 'transparent', color: '#495057' } // Default
    }
  }
}