"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimpleActivity = void 0;
var react_1 = __importDefault(require("react"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var EntityUriLink_1 = require("../../../../../EntityUriLink");
var ActivityTitle_1 = require("../../../ActivityTitle");
var ObjectLabel_1 = require("../ObjectLabel");
var styles_1 = require("./styles");
var SimpleActivity = function (_a) {
    var type = _a.type, data = _a.data;
    var styles = (0, styles_1.useStyles)();
    var description = (0, mdm_sdk_1.parseJSON)(data.description);
    var itemsTotal = data.itemsTotal;
    return (react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "simple-activity" },
        description && (react_1.default.createElement(EntityUriLink_1.EntityUriLink, { className: styles.link, value: description.uri }, (0, mdm_sdk_1.getLabel)(description.label))),
        itemsTotal > 1 && (react_1.default.createElement(ObjectLabel_1.ObjectLabel, { "data-reltio-id": "simple-activity-items-total", label: ui_i18n_1.default.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) }))));
};
exports.SimpleActivity = SimpleActivity;
