export interface MiddlewareConfig {
  id: string
  middleware_name: string
  enabled: boolean
  config: Record<string, unknown>
  updated_at: string | null
}

export interface RateLimitIP {
  id: string
  ip_address: string
  list_type: 'whitelist' | 'blacklist'
  reason: string | null
  expires_at: string | null
  created_at: string
}

export interface MiddlewareEvent {
  id: string
  middleware_name: string
  event_type: string
  ip_address: string | null
  user_id: string | null
  request_path: string | null
  request_method: string | null
  details: Record<string, unknown> | null
  created_at: string
}

export interface MiddlewareStats {
  middleware_name: string
  total_events: number
  events_last_hour: number
  events_last_24h: number
  top_event_types: Array<{ event_type: string; count: number }>
  top_ips: Array<{ ip_address: string; count: number }>
}

export type TabId = 'overview' | 'config' | 'ip-list' | 'events' | 'stats'
