import { Drawer, Box, Divider, MenuItem, } from '@biom3/react'; import { useTranslation } from 'react-i18next'; import { formatZeroAmount, tokenValueFormat } from '../../lib/utils'; import { FormattedFee } from '../../widgets/swap/functions/swapFees'; import { feeItemContainerStyles, feeItemLoadingStyles, feesBreakdownContentStyles } from './FeesBreakdownStyles'; import { FeeItem } from './FeeItem'; import { FooterLogo } from '../Footer/FooterLogo'; type FeesBreakdownProps = { onCloseDrawer?: () => void; fees: FormattedFee[]; children?: any; visible?: boolean; totalFiatAmount?: string; totalAmount?: string; tokenSymbol: string; loading?: boolean; }; export function FeesBreakdown({ fees, children, visible, onCloseDrawer, totalFiatAmount, totalAmount, tokenSymbol, loading = false, }: FeesBreakdownProps) { const { t } = useTranslation(); return ( {children} { loading && ( ) } { !loading && fees.map(({ label, amount, fiatAmount, prefix, token, }) => ( )) } {totalAmount && ( <> )} ); }