import { Badge, Card } from 'react-bootstrap' import styles from '@/styles/wallet.module.css' import Plug from '@/svgs/plug.svg' import Gear from '@/svgs/settings-5-fill.svg' import Link from 'next/link' import { Status } from 'wallets' import DraggableIcon from '@/svgs/draggable.svg' export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnter, onDragEnd, onTouchStart, sourceIndex, targetIndex, index }) { const { card: { title, badges } } = wallet let indicator = styles.disabled switch (wallet.status) { case Status.Enabled: case true: indicator = styles.success break case Status.Locked: indicator = styles.warning break case Status.Error: indicator = styles.error break case Status.Initialized: case false: indicator = styles.disabled break } return (
{wallet.status === Status.Enabled && }
{title} {badges?.map( badge => {badge} )} {wallet.isConfigured ? <>configure : <>attach} ) }