import React, { useContext } from 'react';
import classnames from 'classnames';
import { getHistoryAppearanceBySpecialAttributeValue, getHistoryAttributeClassName, getRoleLabel } from '@reltio/mdm-sdk';
import { HistoryDiffContext } from '../../../contexts/HistoryAppearanceContext';
import { useMdmMetadata } from '../../../contexts/MdmModuleContext';
import { useStyles } from './styles';
export var Role = function (_a) {
    var value = _a.value;
    var styles = useStyles();
    var appearance = useContext(HistoryDiffContext).appearance;
    var metadata = useMdmMetadata();
    var attributeAppearance = getHistoryAppearanceBySpecialAttributeValue('roles', value, appearance);
    var historyClassName = getHistoryAttributeClassName(attributeAppearance);
    return (React.createElement("span", { className: classnames(styles.attributeValue, styles[historyClassName]) }, getRoleLabel(metadata, value)));
};
