"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SegmentRecord = void 0;
var react_1 = __importDefault(require("react"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var Record_1 = require("../Record");
var RecordLabel_1 = require("../RecordLabel");
var RecordUpdates_1 = require("../RecordUpdates");
var SegmentObject_1 = require("../SegmentObject");
var SegmentRecord = function (_a) {
    var _b;
    var item = _a.item;
    var deltaArray = (_b = item === null || item === void 0 ? void 0 : item.deltaCollection) === null || _b === void 0 ? void 0 : _b.delta;
    return (react_1.default.createElement(Record_1.Record, null,
        react_1.default.createElement(RecordLabel_1.RecordLabel, { description: deltaArray ? '' : ui_i18n_1.default.text('Segment changed') },
            react_1.default.createElement(SegmentObject_1.SegmentObject, { item: item })),
        react_1.default.createElement(RecordUpdates_1.RecordUpdates, { updates: deltaArray, recordId: item.id, isSegment: true })));
};
exports.SegmentRecord = SegmentRecord;
