"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContributorItem = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var styles_1 = require("./styles");
var ContributorItem = function (_a) {
    var _b;
    var value = _a.value, _c = _a.isSelected, isSelected = _c === void 0 ? true : _c, onClick = _a.onClick;
    var color = (0, mdm_sdk_1.getContributorColor)(value);
    var styles = (0, styles_1.useStyles)({ color: color });
    return (react_1.default.createElement("div", { "data-reltio-id": "reltio-contributor-item", "data-reltio-contributor": value, className: (0, classnames_1.default)(styles.icon, (_b = {},
            _b[styles.inactive] = !isSelected,
            _b[styles.active] = isSelected,
            _b[styles.clickable] = !!onClick,
            _b)), onClick: onClick }));
};
exports.ContributorItem = ContributorItem;
