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