import React from 'react';
import classnames from 'classnames';
import Typography from '@mui/material/Typography';
import i18n from 'ui-i18n';
import SvgRequestSummary from '../../../../../icons/RequestSummary';
import { DCRChangesSummary } from '../DCRChangesSummary';
import { getDCRId } from '../../../helpers/common';
import styles from './DCRSummaryInfo.module.css';
export var DCRSummaryInfo = function (_a) {
    var dcr = _a.dcr, task = _a.task, groupedObjects = _a.groupedObjects;
    var dcrId = getDCRId(task.objectURIs);
    return (React.createElement("div", { className: styles.requestSummary },
        React.createElement("div", { className: styles.summaryLeft },
            React.createElement("div", { className: styles.summaryIcon },
                React.createElement(SvgRequestSummary, null)),
            React.createElement("div", { className: styles.summaryContent },
                React.createElement(Typography, { variant: "h6", className: styles.summaryTitle }, i18n.text('Request Summary')),
                React.createElement("div", { className: styles.summaryDetails },
                    React.createElement("div", { className: styles.summaryItem },
                        React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('DCR ID'), ": ")),
                        dcrId),
                    React.createElement("div", { className: styles.summaryItem },
                        React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('Created by'), ": ")),
                        task.createdBy),
                    React.createElement("div", { className: classnames(styles.summaryItem, styles.summaryItemDate) },
                        React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('on'), " ")),
                        i18n.date(task.createTime, 'L')),
                    React.createElement("div", { className: styles.summaryItem },
                        React.createElement("span", { className: styles.summaryItemName }, "".concat(i18n.text('Step'), ": ")),
                        task.displayName)))),
        React.createElement("div", { className: styles.summaryRight },
            React.createElement(DCRChangesSummary, { changes: dcr === null || dcr === void 0 ? void 0 : dcr.changes, groupedObjects: groupedObjects }))));
};
