import VerifiedUserIcon from '@mui/icons-material/VerifiedUser'; import { Box, Collapse, Link, Typography } from '@mui/material'; import type { ChangeEvent } from 'react'; import { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { InsuraceLogo } from '../../icons'; import { RouteExecutionStatus } from '../../stores'; import { Card, CardLabel, CardLabelTypography } from '../Card'; import { Switch } from '../Switch'; import type { InsuranceCardProps } from './types'; export const InsuranceCard: React.FC = ({ status, feeAmountUsd, insuredAmount, insuredTokenSymbol, insuranceCoverageId, onChange, ...props }) => { const { t } = useTranslation(); const [enabled, setEnabled] = useState(false); const handleSwitch = (_: ChangeEvent, checked: boolean) => { setEnabled(checked); onChange?.(checked); }; return ( {status === RouteExecutionStatus.Idle ? t('main.tags.insurance') : t('main.tags.insured')} {t('format.currency', { value: feeAmountUsd, })} ]} /> {t('insurance.bridgeExploits')} {t('insurance.slippageError')} {status === RouteExecutionStatus.Idle ? t('button.learnMore') : t('button.viewCoverage')} ); };