import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Badge, ToggleButton, ToggleButtonGroup, List, Chip, ListItem, ListItemText, ListItemIcon, Grid, Divider, Typography, } from "@mui/material" import { pn } from "../utils/prettyNumbers"; // Icons import FlagWithProps from "./FlagWithProps"; import PercentIcon from '@mui/icons-material/Percent'; import AccountBalanceIcon from '@mui/icons-material/AccountBalance'; import RouteIcon from '@mui/icons-material/Route'; import AccountBoxIcon from '@mui/icons-material/AccountBox'; import LockOpenIcon from '@mui/icons-material/LockOpen'; import LinkIcon from '@mui/icons-material/Link'; import { RoboSatsNoTextIcon , SendReceiveIcon , BitcoinIcon} from "./Icons"; interface Item { id: string; name: string; } type Props = { isMaker: boolean; makerNick: string; takerNick: string; currencyCode: string; makerSummary: Record; takerSummary: Record; platformSummary: Record; bondPercent: number; } const TradeSummary = ({ isMaker, makerNick, takerNick, currencyCode, makerSummary, takerSummary, platformSummary, bondPercent, }: Props): JSX.Element => { const { t } = useTranslation(); const [buttonValue, setButtonValue] = useState(isMaker ? 0 : 2); var userSummary = buttonValue == 0 ? makerSummary : takerSummary; return ( setButtonValue(0)}>   {t("Maker")} setButtonValue(1)}> setButtonValue(2)}> {t("Taker")}   {/* Maker/Taker Summary */}
{userSummary.is_buyer ? : }
}>
{userSummary.is_swap ? : null} {t("Unlocked")}}/> {/* Platform Summary */}
); }; export default TradeSummary;