import type { Route } from '@lifi/sdk' import LocalGasStationRounded from '@mui/icons-material/LocalGasStationRounded' import { Box, Skeleton, Typography } from '@mui/material' import { useTranslation } from 'react-i18next' import { getAccumulatedFeeCostsBreakdown } from '../../utils/fees.js' import { SmallAvatar } from '../Avatar/SmallAvatar.js' import type { CardProps } from '../Card/Card.js' import { Card } from '../Card/Card.js' import { IconTypography } from '../IconTypography.js' interface RouteProviderCardProps { route: Route active?: boolean } export const RouteProviderCard: React.FC< RouteProviderCardProps & Omit > = ({ route, active, onClick, ...other }) => { const { t } = useTranslation() const provider = route.steps[0]?.toolDetails const { gasCostUSD } = getAccumulatedFeeCostsBreakdown(route) return ( {provider?.name?.[0]} {provider?.name} {!gasCostUSD ? t('main.fees.free') : t('format.currency', { value: gasCostUSD, })} ) } export const RouteProviderCardSkeleton: React.FC> = ( props ) => { return ( ) }