"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GroupItem = void 0;
var react_1 = __importDefault(require("react"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var Spacer_1 = require("../../../../../Spacer");
var CollapseButton_1 = require("../../../../../CollapseButton");
var styles_1 = require("./styles");
var GroupItem = function (_a) {
    var _b = _a.item, index = _b.index, timestamp = _b.timestamp, collapsed = _b.collapsed, onToggle = _a.onToggle;
    var styles = (0, styles_1.useStyles)();
    return (react_1.default.createElement("div", { className: styles.groupItem, "data-reltio-id": "activity-log-group-item" },
        react_1.default.createElement("div", { className: styles.groupIcon }),
        react_1.default.createElement(Typography_1.default, { className: styles.groupTitle, variant: 'subtitle1' }, (0, mdm_sdk_1.isToday)(timestamp) ? ui_i18n_1.default.text('Today') : ui_i18n_1.default.date(timestamp, 'LL')),
        react_1.default.createElement(Spacer_1.Spacer, null),
        react_1.default.createElement(CollapseButton_1.CollapseButton, { isOpen: !collapsed, onClick: function () { return onToggle(index); } })));
};
exports.GroupItem = GroupItem;
