import React from 'react';
import i18n from 'ui-i18n';
import { getLabel, parseJSON } from '@reltio/mdm-sdk';
import { EntityUriLink } from '../../../../../EntityUriLink';
import { ActivityTitle } from '../../../ActivityTitle';
import { ObjectLabel } from '../ObjectLabel';
import { useStyles } from './styles';
export var SimpleActivity = function (_a) {
    var type = _a.type, data = _a.data;
    var styles = useStyles();
    var description = parseJSON(data.description);
    var itemsTotal = data.itemsTotal;
    return (React.createElement(ActivityTitle, { type: type, "data-reltio-id": "simple-activity" },
        description && (React.createElement(EntityUriLink, { className: styles.link, value: description.uri }, getLabel(description.label))),
        itemsTotal > 1 && (React.createElement(ObjectLabel, { "data-reltio-id": "simple-activity-items-total", label: i18n.text('(${itemsTotal} records)', { itemsTotal: itemsTotal }) }))));
};
