import { Landmark } from 'lucide-react' import { t, type Language } from '../../../i18n/translations' import { getExchangeIcon } from '../../ExchangeIcons' import { getShortName } from '../index' import type { Exchange } from '../../../types' interface ExchangesSectionProps { language: Language configuredExchanges: Exchange[] isExchangeInUse: (exchangeId: string) => boolean onExchangeClick: (exchangeId: string) => void } export function ExchangesSection({ language, configuredExchanges, isExchangeInUse, onExchangeClick, }: ExchangesSectionProps) { return (

{t('exchanges', language)}

{configuredExchanges.map((exchange) => { const inUse = isExchangeInUse(exchange.id) return (
onExchangeClick(exchange.id)} >
{getExchangeIcon(exchange.id, { width: 28, height: 28 })}
{getShortName(exchange.name)}
{exchange.type.toUpperCase()} •{' '} {inUse ? t('inUse', language) : exchange.enabled ? t('enabled', language) : t('configured', language)}
) })} {configuredExchanges.length === 0 && (
{t('noExchangesConfigured', language)}
)}
) }