"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var ramda_1 = require("ramda");
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var withTableContext_1 = require("../HOCs/withTableContext");
var EntityAvatar_1 = require("../EntityAvatar");
var EntityUriLink_1 = require("../EntityUriLink");
var basicTable_1 = require("../types/basicTable");
var styles_module_css_1 = __importDefault(require("./styles.module.css"));
var EntityProfileRenderer = function (_a) {
    var _b = _a.value, entity = _b === void 0 ? {} : _b, _c = _a.variant, variant = _c === void 0 ? basicTable_1.TableVariant.Wide : _c, className = _a.columnData.className;
    var label = (0, mdm_sdk_1.getLabel)(entity.label);
    return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles_module_css_1.default.defaultWrapper, styles_module_css_1.default.profileWrapper, styles_module_css_1.default[variant], className) },
        react_1.default.createElement(EntityAvatar_1.EntityAvatar, { avatarClassName: styles_module_css_1.default.entityAvatar, imageClassName: styles_module_css_1.default.entityAvatarImage, entity: entity }),
        react_1.default.createElement(EntityUriLink_1.EntityUriLink, { value: (0, mdm_sdk_1.getEntityUriForLink)(entity), className: styles_module_css_1.default.entityLink }, label)));
};
exports.default = (0, withTableContext_1.withTableContext)((0, ramda_1.pick)(['variant']))(EntityProfileRenderer);
