const icons = {
  flex: {
    1: "flex_app_chain_1.gif",
    108: "flex_app_chain_108.gif",
    1284: "flex_app_chain_1284.gif",
    1285: "flex_app_chain_1285.gif",
    1313114: "flex_app_chain_1313114.gif",
    1620: "flex_app_chain_1620.gif",
    19: "flex_app_chain_19.gif",
    1987: "flex_app_chain_1987.gif",
    2: "flex_app_chain_2.gif",
    200625: "flex_app_chain_200625.gif",
    20531811: "flex_app_chain_20531811.gif",
    20531812: "flex_app_chain_20531812.gif",
    237: "flex_app_chain_237.gif",
    24484: "flex_app_chain_24484.gif",
    246: "flex_app_chain_246.gif",
    246529: "flex_app_chain_246529.gif",
    246785: "flex_app_chain_246785.gif",
    248: "flex_app_chain_248.gif",
    269: "flex_app_chain_269.gif",
    2894: "flex_app_chain_2894.gif",
    30: "flex_app_chain_30.gif",
    31: "flex_app_chain_31.gif",
    31102: "flex_app_chain_31102.gif",
    3125659152: "flex_app_chain_3125659152.gif",
    336: "flex_app_chain_336.gif",
    50: "flex_app_chain_50.gif",
    592: "flex_app_chain_592.gif",
    60: "flex_app_chain_60.gif",
    61: "flex_app_chain_61.gif",
    64: "flex_app_chain_64.gif",
    73799: "flex_app_chain_73799.gif",
    76: "flex_app_chain_76.gif",
    7762959: "flex_app_chain_7762959.gif",
    78: "flex_app_chain_78.gif",
    8: "flex_app_chain_8.gif",
    820: "flex_app_chain_820.gif",
    846000: "flex_app_chain_846000.gif",
    88: "flex_app_chain_88.gif",
    888: "flex_app_chain_888.gif",
  },
  stax: {
    1: "stax_app_chain_1.gif",
    108: "stax_app_chain_108.gif",
    1284: "stax_app_chain_1284.gif",
    1285: "stax_app_chain_1285.gif",
    1313114: "stax_app_chain_1313114.gif",
    1620: "stax_app_chain_1620.gif",
    19: "stax_app_chain_19.gif",
    1987: "stax_app_chain_1987.gif",
    2: "stax_app_chain_2.gif",
    200625: "stax_app_chain_200625.gif",
    20531811: "stax_app_chain_20531811.gif",
    20531812: "stax_app_chain_20531812.gif",
    237: "stax_app_chain_237.gif",
    24484: "stax_app_chain_24484.gif",
    246: "stax_app_chain_246.gif",
    246529: "stax_app_chain_246529.gif",
    246785: "stax_app_chain_246785.gif",
    248: "stax_app_chain_248.gif",
    269: "stax_app_chain_269.gif",
    2894: "stax_app_chain_2894.gif",
    30: "stax_app_chain_30.gif",
    31: "stax_app_chain_31.gif",
    31102: "stax_app_chain_31102.gif",
    3125659152: "stax_app_chain_3125659152.gif",
    336: "stax_app_chain_336.gif",
    50: "stax_app_chain_50.gif",
    592: "stax_app_chain_592.gif",
    60: "stax_app_chain_60.gif",
    61: "stax_app_chain_61.gif",
    64: "stax_app_chain_64.gif",
    73799: "stax_app_chain_73799.gif",
    76: "stax_app_chain_76.gif",
    7762959: "stax_app_chain_7762959.gif",
    78: "stax_app_chain_78.gif",
    8: "stax_app_chain_8.gif",
    820: "stax_app_chain_820.gif",
    846000: "stax_app_chain_846000.gif",
    88: "stax_app_chain_88.gif",
    888: "stax_app_chain_888.gif",
  },
} as const;

export const getIconFor = (device: "stax" | "flex", chainId: number) => {
  const deviceMap = icons[device];
  const gif = deviceMap[chainId as keyof typeof deviceMap] ?? deviceMap[1];
  return `/assets/chain-icons/${gif}`;
};
