const ApiProviderNodary = require('../logos/api-provider/Nodary.svg');
const ApiProviderBlocksize = require('../logos/api-provider/Blocksize.svg');
const ApiProviderCoingecko = require('../logos/api-provider/Coingecko.svg');
const ApiProviderCoinmetrics = require('../logos/api-provider/Coinmetrics.svg');
const ApiProviderCoinpaprika = require('../logos/api-provider/Coinpaprika.svg');
const ApiProviderNcfx = require('../logos/api-provider/Ncfx.svg');
const ApiProviderShiftmarkets = require('../logos/api-provider/Shiftmarkets.svg');
const ApiProviderAlchemy = require('../logos/api-provider/Alchemy.svg');
const ApiProviderAnkr = require('../logos/api-provider/Ankr.svg');
const ApiProviderDrpc = require('../logos/api-provider/Drpc.svg');
const ApiProviderInfura = require('../logos/api-provider/Infura.svg');
const ApiProviderFinage = require('../logos/api-provider/Finage.svg');
const ApiProviderDxfeed = require('../logos/api-provider/Dxfeed.svg');
const ApiProviderKaiko = require('../logos/api-provider/Kaiko.svg');
const ApiProviderTwelvedata = require('../logos/api-provider/Twelvedata.svg');
const ApiProviderPlaceholder = require('../logos/api-provider/Placeholder.svg');
function sanitizeName(id) {
  return id.replace(/\s+|-/g, '').replace(/ExchangeRate/g, '');
}
function ApiProviderLogo(id, light = false) {
  if (!id) {
    return ApiProviderPlaceholder;
  }
  switch (sanitizeName(`${id}${light ? "light" : ""}`).toLowerCase()) {
    case "nodary":
      return ApiProviderNodary;
    case "blocksize":
      return ApiProviderBlocksize;
    case "coingecko":
      return ApiProviderCoingecko;
    case "coinmetrics":
      return ApiProviderCoinmetrics;
    case "coinpaprika":
      return ApiProviderCoinpaprika;
    case "ncfx":
      return ApiProviderNcfx;
    case "shiftmarkets":
      return ApiProviderShiftmarkets;
    case "alchemy":
      return ApiProviderAlchemy;
    case "ankr":
      return ApiProviderAnkr;
    case "drpc":
      return ApiProviderDrpc;
    case "infura":
      return ApiProviderInfura;
    case "finage":
      return ApiProviderFinage;
    case "dxfeed":
      return ApiProviderDxfeed;
    case "kaiko":
      return ApiProviderKaiko;
    case "twelvedata":
      return ApiProviderTwelvedata;
    default:
      return light ? ApiProviderLogo(id) : ApiProviderPlaceholder;
  }
}
module.exports = ApiProviderLogo;