"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttrTypeIcon = void 0;
var react_1 = __importDefault(require("react"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var NestedAttribute_1 = __importDefault(require("../../../icons/NestedAttribute"));
var ReferenceAttribute_1 = __importDefault(require("../../../icons/ReferenceAttribute"));
var SimpleAttribute_1 = __importDefault(require("../../../icons/SimpleAttribute"));
var styles_1 = require("./styles");
var getIconForAttrType = function (attrType) {
    switch (attrType.type) {
        case mdm_sdk_1.DataTypes.TYPE_IMAGE:
        case mdm_sdk_1.DataTypes.TYPE_NESTED:
            return NestedAttribute_1.default;
        case mdm_sdk_1.DataTypes.TYPE_REFERENCE:
            return ReferenceAttribute_1.default;
        default:
            return SimpleAttribute_1.default;
    }
};
var AttrTypeIcon = function (_a) {
    var _b = _a.attrType, attrType = _b === void 0 ? {} : _b;
    var styles = (0, styles_1.useStyles)();
    var Icon = getIconForAttrType(attrType);
    return react_1.default.createElement(Icon, { className: styles.icon });
};
exports.AttrTypeIcon = AttrTypeIcon;
