import React from 'react';
import { DataTypes } from '@reltio/mdm-sdk';
import NestedAttrIcon from '../../../icons/NestedAttribute';
import ReferenceAttrIcon from '../../../icons/ReferenceAttribute';
import SimpleAttrIcon from '../../../icons/SimpleAttribute';
import { useStyles } from './styles';
var getIconForAttrType = function (attrType) {
    switch (attrType.type) {
        case DataTypes.TYPE_IMAGE:
        case DataTypes.TYPE_NESTED:
            return NestedAttrIcon;
        case DataTypes.TYPE_REFERENCE:
            return ReferenceAttrIcon;
        default:
            return SimpleAttrIcon;
    }
};
export var AttrTypeIcon = function (_a) {
    var _b = _a.attrType, attrType = _b === void 0 ? {} : _b;
    var styles = useStyles();
    var Icon = getIconForAttrType(attrType);
    return React.createElement(Icon, { className: styles.icon });
};
