import React from 'react';
import { AmbientCard } from '../../../../../UI/surfaces/cards/AmbientCard';
import { EmptyStateDisplay } from '../../../../../UI';
import { useTranslation } from 'react-i18next';
import { TransactionAttachment } from './TransactionAttachment';
import { LinearProgress } from '@material-ui/core';
export const TransactionAttachments = (props) => {
    var _a;
    const { transactionAttachments, isLoading } = props;
    const { t } = useTranslation();
    return (React.createElement("div", null, isLoading ? (React.createElement(LinearProgress, null)) : ((_a = transactionAttachments === null || transactionAttachments === void 0 ? void 0 : transactionAttachments.pageList) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (React.createElement(AmbientCard, { fullWidth: true }, transactionAttachments.pageList.map((attachment, index) => (React.createElement(TransactionAttachment, { key: index, attachment: attachment, isLastItem: index === transactionAttachments.pageList.length - 1 }))))) : (React.createElement("div", null, React.createElement(EmptyStateDisplay, { primaryText: t('No Attachments') })))));
};
//# sourceMappingURL=TransactionAttachments.js.map