import { ReactElement, useMemo } from 'react' import { CircularProgress } from 'components/CircularProgress' import Text from 'components/Text' import { Tooltip } from 'components/Tooltip' import { BN } from 'utils/helpers' interface Props { health: number healthFactor: number children: ReactElement } function HealthTooltipContent({ health, healthFactor }: { health: number; healthFactor: number }) { const healthStatus = useMemo(() => { if (health > 30) return 'Healthy' if (health > 10) return 'Attention' if (health > 0 && health <= 10) return 'Close to Liquidation' return 'Liquidation Risk' }, [health]) if (healthFactor === 0) return (