import type { FC } from 'react';
import React from 'react';
import { Section } from '@theorchard/suite-components';
import { formatMessage } from '@theorchard/suite-frontend';

const CLASSNAME = 'AccountSummarySection';
const TITLE = formatMessage('accountPage.accountSummary');

interface Props {
    info?: string;
}

const AccountSummarySection: FC<Props> = ({ info }) => {
    if (!info) return null;

    return (
        <div className={CLASSNAME}>
            <Section level="sub">
                <Section.Header title={TITLE} />
                <Section.Body>{info}</Section.Body>
            </Section>
        </div>
    );
};

export default AccountSummarySection;
