import React from 'react';
import classNames from 'classnames';
import { pick } from 'ramda';
import { getEntityUriForLink, getLabel } from '@reltio/mdm-sdk';
import { withTableContext } from '../HOCs/withTableContext';
import { EntityAvatar } from '../EntityAvatar';
import { EntityUriLink } from '../EntityUriLink';
import { TableVariant } from '../types/basicTable';
import styles from './styles.module.css';
var EntityProfileRenderer = function (_a) {
    var _b = _a.value, entity = _b === void 0 ? {} : _b, _c = _a.variant, variant = _c === void 0 ? TableVariant.Wide : _c, className = _a.columnData.className;
    var label = getLabel(entity.label);
    return (React.createElement("div", { className: classNames(styles.defaultWrapper, styles.profileWrapper, styles[variant], className) },
        React.createElement(EntityAvatar, { avatarClassName: styles.entityAvatar, imageClassName: styles.entityAvatarImage, entity: entity }),
        React.createElement(EntityUriLink, { value: getEntityUriForLink(entity), className: styles.entityLink }, label)));
};
export default withTableContext(pick(['variant']))(EntityProfileRenderer);
