var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import { DataTypes } from '@reltio/mdm-sdk';
import { SimpleAttribute } from '../SimpleAttribute';
import { NestedAttribute } from '../NestedAttribute';
import { ReferenceAttribute } from '../ReferenceAttribute';
var ReadOnlyAttributesFactory = /** @class */ (function () {
    function ReadOnlyAttributesFactory() {
    }
    ReadOnlyAttributesFactory.build = function (attributeType, props) {
        if (props === void 0) { props = {}; }
        switch (attributeType.type) {
            case DataTypes.TYPE_NESTED:
                return React.createElement(NestedAttribute, __assign({}, props));
            case DataTypes.TYPE_REFERENCE:
                return React.createElement(ReferenceAttribute, __assign({}, props));
            default:
                return React.createElement(SimpleAttribute, __assign({}, props));
        }
    };
    return ReadOnlyAttributesFactory;
}());
export { ReadOnlyAttributesFactory };
