import { Body, Box, Button, CloudImage, Drawer, Heading, } from '@biom3/react'; import { Checkout } from '@imtbl/checkout-sdk'; import { Environment } from '@imtbl/config'; import { useTranslation } from 'react-i18next'; import { getRemoteImage } from '../../lib/utils'; export enum WithdrawalQueueWarningType { TYPE_THRESHOLD = 'exceedsThreshold', TYPE_ACTIVE_QUEUE = 'queueActivated', } export interface WithdrawalQueueDrawerProps { visible: boolean; checkout: Checkout; onCloseDrawer: () => void; warningType?: WithdrawalQueueWarningType; onAdjustAmount?: () => void; threshold?: number; } export function WithdrawalQueueDrawer({ visible, checkout, warningType, onCloseDrawer, onAdjustAmount, threshold, }: WithdrawalQueueDrawerProps) { const { t } = useTranslation(); const bridgeWarningUrl = getRemoteImage( checkout.config.environment ?? Environment.PRODUCTION, '/notenougheth.svg', ); return ( warningType && ( )} /> {t(`drawers.withdrawalQueue.${warningType}.heading`, { threshold })} {t(`drawers.withdrawalQueue.${warningType}.body`, { threshold })} {warningType === WithdrawalQueueWarningType.TYPE_THRESHOLD && ( )} ) ); }