import { useTranslation } from 'next-i18next' import { formatCurrencyValue } from 'utils/numbers' import FormatNumericValue from './FormatNumericValue' const getPnlColor = (pnl: number) => { return pnl < 0 ? 'text-th-down' : pnl > 0 ? 'text-th-up' : 'text-th-fgd-3' } const PnlTooltipContent = ({ unrealizedPnl, realizedPnl, totalPnl, unsettledPnl, roe, }: { unrealizedPnl: number realizedPnl: number totalPnl: number unsettledPnl: number roe: number }) => { const { t } = useTranslation(['common', 'trade']) return (

{t('trade:unrealized-pnl')}

{formatCurrencyValue(unrealizedPnl, 2)}

{t('trade:realized-pnl')}

{formatCurrencyValue(realizedPnl, 2)}

{t('trade:total-pnl')}

{formatCurrencyValue(totalPnl, 2)}

{t('trade:return-on-equity')}

%

{t('trade:unsettled')} {t('pnl')}

{formatCurrencyValue(unsettledPnl, 2)}
{t('learn-more')}
) } export default PnlTooltipContent