"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SegmentObject = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var types_1 = require("../types");
var SegmentIdLink_1 = require("../../../SegmentIdLink");
var SegmentObject_module_css_1 = __importDefault(require("./SegmentObject.module.css"));
var SegmentObject = function (_a) {
    var _b;
    var item = _a.item;
    var objectLabel = item.objectLabel, objectUri = item.objectUri, data = item.data;
    var isRemoved = (data === null || data === void 0 ? void 0 : data.type) === types_1.ActivityTypes.SEGMENT_DELETE;
    var segmentId = objectUri === null || objectUri === void 0 ? void 0 : objectUri.split('/').pop();
    return (react_1.default.createElement(SegmentIdLink_1.SegmentIdLink, { className: (0, classnames_1.default)(SegmentObject_module_css_1.default.link, (_b = {}, _b[SegmentObject_module_css_1.default.removed] = isRemoved, _b)), segmentId: segmentId }, (0, mdm_sdk_1.getLabel)(objectLabel)));
};
exports.SegmentObject = SegmentObject;
