import type { ExtendedChain } from '@lifi/sdk' import { Box } from '@mui/material' import { memo } from 'react' import { Avatar, ListItem, ListItemAvatar, ListItemButton, ListItemText, } from './ChainList.style.js' import { PinChainButton, pinButtonClassName } from './PinChainButton.js' interface ChainListItemProps { chain: ExtendedChain onSelect: (chain: ExtendedChain) => void selected?: boolean itemsSize: 'small' | 'medium' size: number start: number isPinned: boolean onPin: (chainId: number) => void withPin: boolean } export const ChainListItem = memo( ({ chain, onSelect, selected, itemsSize, size, start, isPinned, onPin, withPin, }: ChainListItemProps) => { return ( onSelect(chain)} selected={selected} size={itemsSize} > {chain.name[0]} {withPin && ( onPin(chain.id)} /> )} ) } )