"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MergeActivity = void 0;
var react_1 = __importDefault(require("react"));
var ActivityTitle_1 = require("../../../ActivityTitle");
var CollapsibleActivityRecords_1 = require("../../../CollapsibleActivityRecords");
var EntityObject_1 = require("../../../EntityObject");
var PotentialMatchRecord_1 = require("../../../PotentialMatchRecord");
var MergeActivity = function (_a) {
    var type = _a.type, data = _a.data;
    var itemsTotal = data.itemsTotal, items = data.items, uri = data.uri;
    var isMinimized = itemsTotal === 1 && !(items[0].data.potentialMatches || items[0].data.newUri);
    return (react_1.default.createElement("div", { "data-reltio-id": "merge-activity" },
        react_1.default.createElement(ActivityTitle_1.ActivityTitle, { type: type, "data-reltio-id": "merge-activity-title" }, isMinimized && react_1.default.createElement(EntityObject_1.EntityObject, { item: items[0] })),
        !isMinimized && (react_1.default.createElement(CollapsibleActivityRecords_1.CollapsibleActivityRecords, { activityUri: uri, items: items, RecordComponent: PotentialMatchRecord_1.PotentialMatchRecord }))));
};
exports.MergeActivity = MergeActivity;
