import React from 'react';
import { ActivityTitle } from '../../../ActivityTitle';
import { CollapsibleActivityRecords } from '../../../CollapsibleActivityRecords';
import { EntityObject } from '../../../EntityObject';
import { EntityRecord } from '../../../EntityRecord';
export var ProfileActivity = function (_a) {
    var _b;
    var type = _a.type, data = _a.data;
    var isMinimized = data.itemsTotal === 1 && !((_b = data.items[0].deltaCollection) === null || _b === void 0 ? void 0 : _b.delta);
    return (React.createElement("div", { "data-reltio-id": "profile-activity" },
        React.createElement(ActivityTitle, { type: type, "data-reltio-id": "profile-activity-title" }, isMinimized && React.createElement(EntityObject, { item: data.items[0] })),
        !isMinimized && (React.createElement(CollapsibleActivityRecords, { activityUri: data.uri, items: data.items, RecordComponent: EntityRecord }))));
};
