"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DCRSummaryInfo = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var RequestSummary_1 = __importDefault(require("../../../../../icons/RequestSummary"));
var DCRChangesSummary_1 = require("../DCRChangesSummary");
var common_1 = require("../../../helpers/common");
var DCRSummaryInfo_module_css_1 = __importDefault(require("./DCRSummaryInfo.module.css"));
var DCRSummaryInfo = function (_a) {
    var dcr = _a.dcr, task = _a.task, groupedObjects = _a.groupedObjects;
    var dcrId = (0, common_1.getDCRId)(task.objectURIs);
    return (react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.requestSummary },
        react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryLeft },
            react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryIcon },
                react_1.default.createElement(RequestSummary_1.default, null)),
            react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryContent },
                react_1.default.createElement(Typography_1.default, { variant: "h6", className: DCRSummaryInfo_module_css_1.default.summaryTitle }, ui_i18n_1.default.text('Request Summary')),
                react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryDetails },
                    react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryItem },
                        react_1.default.createElement("span", { className: DCRSummaryInfo_module_css_1.default.summaryItemName }, "".concat(ui_i18n_1.default.text('DCR ID'), ": ")),
                        dcrId),
                    react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryItem },
                        react_1.default.createElement("span", { className: DCRSummaryInfo_module_css_1.default.summaryItemName }, "".concat(ui_i18n_1.default.text('Created by'), ": ")),
                        task.createdBy),
                    react_1.default.createElement("div", { className: (0, classnames_1.default)(DCRSummaryInfo_module_css_1.default.summaryItem, DCRSummaryInfo_module_css_1.default.summaryItemDate) },
                        react_1.default.createElement("span", { className: DCRSummaryInfo_module_css_1.default.summaryItemName }, "".concat(ui_i18n_1.default.text('on'), " ")),
                        ui_i18n_1.default.date(task.createTime, 'L')),
                    react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryItem },
                        react_1.default.createElement("span", { className: DCRSummaryInfo_module_css_1.default.summaryItemName }, "".concat(ui_i18n_1.default.text('Step'), ": ")),
                        task.displayName)))),
        react_1.default.createElement("div", { className: DCRSummaryInfo_module_css_1.default.summaryRight },
            react_1.default.createElement(DCRChangesSummary_1.DCRChangesSummary, { changes: dcr === null || dcr === void 0 ? void 0 : dcr.changes, groupedObjects: groupedObjects }))));
};
exports.DCRSummaryInfo = DCRSummaryInfo;
