import React from 'react';
import { getAbsoluteImageUrl, getEntityTypeGraphIcon } from '@reltio/mdm-sdk';
import { AvatarWithFallback } from '../AvatarWithFallback';
import { useMdmAbsoluteImagePath } from '../contexts/MdmModuleContext';
import { useStyles } from './styles';
export var AttributeGroupIcon = function (_a) {
    var group = _a.group, metadata = _a.metadata;
    var styles = useStyles();
    var absoluteImagePath = useMdmAbsoluteImagePath();
    var entityTypeGraphIcon = getEntityTypeGraphIcon(metadata, { type: group.id });
    var absoluteImageUrl = getAbsoluteImageUrl(absoluteImagePath, entityTypeGraphIcon);
    return React.createElement(AvatarWithFallback, { className: styles.icon, icon: absoluteImageUrl, avatarText: group.title[0] });
};
