export type BgpState = "Established" | "Active" | "Idle" | "Connect" | "OpenSent" | "OpenConfirm"
export type BgpType = "eBGP" | "iBGP"
export type BgpAfi = "IPv4 Unicast" | "IPv6 Unicast" | "VPNv4 Unicast"

export interface BgpSessionRow {
  id: string
  serverId: string
  serverLabel: string
  serverSite: string
  peerIp: string
  remoteAs: number
  localAs: number
  routerId: string
  description: string
  state: BgpState
  type: BgpType
  afi: BgpAfi
  uptime: string | null
  holdTime: number
  keepalive: number
  prefixesRx: number
  prefixesTx: number
  prefixesActive: number
  inputMessages: number
  outputMessages: number
  capabilities: string[]
  lastError: string | null
}

export const BGP_AS_NAMES: Record<number, string> = {
  8359: "МТС / Tele2",
  13238: "Яндекс",
  12389: "Ростелеком",
  24940: "Hetzner",
  6777: "AMS-IX",
  1299: "Telia",
  65001: "iBGP internal",
}
