import React from 'react';
import { ActivityTitle } from '../../../ActivityTitle';
import { CollapsibleActivityRecords } from '../../../CollapsibleActivityRecords';
import { EntityObject } from '../../../EntityObject';
import { PotentialMatchRecord } from '../../../PotentialMatchRecord';
export 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.createElement("div", { "data-reltio-id": "merge-activity" },
        React.createElement(ActivityTitle, { type: type, "data-reltio-id": "merge-activity-title" }, isMinimized && React.createElement(EntityObject, { item: items[0] })),
        !isMinimized && (React.createElement(CollapsibleActivityRecords, { activityUri: uri, items: items, RecordComponent: PotentialMatchRecord }))));
};
