/** Supported chains for explorer wallet import (matches token-aggregation networks.ts). */
export const WALLET_IMPORT_CHAIN_IDS = [
  138, 1, 651940, 56, 137, 100, 10, 42161, 8453, 43114, 25, 42220, 1111,
] as const

export type WalletImportChainId = (typeof WALLET_IMPORT_CHAIN_IDS)[number]

export const WALLET_FEATURED_SYMBOLS_BY_CHAIN: Partial<Record<number, readonly string[]>> = {
  138: ['cUSDT', 'cUSDC', 'USDT', 'USDC', 'cXAUC', 'cXAUT', 'WETH', 'LINK'],
  1: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT', 'USDC', 'USDT', 'WETH'],
  651940: ['cUSDC', 'cUSDT', 'AUSDC', 'AUSDT'],
  56: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  137: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  100: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  10: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  42161: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  8453: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  43114: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  25: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  42220: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
  1111: ['cWUSDC', 'cWUSDT', 'cUSDC', 'cUSDT'],
}

export function chainLabel(chainId: number): string {
  const labels: Record<number, string> = {
    138: 'Chain 138',
    1: 'Ethereum',
    651940: 'ALL Mainnet',
    56: 'BSC',
    137: 'Polygon',
    100: 'Gnosis',
    10: 'Optimism',
    42161: 'Arbitrum',
    8453: 'Base',
    43114: 'Avalanche',
    25: 'Cronos',
    42220: 'Celo',
    1111: 'Wemix',
  }
  return labels[chainId] ?? `Chain ${chainId}`
}
