/**
 * amis-ui v6.12.0-beta.0
 * Copyright 2018-2025 fex
 */

import { __extends, __assign } from 'tslib';
import React__default from 'react';
import { ITEMMAP, SchemaEditorItemCommon } from './Common.js';

var SchemaEditorItem = /** @class */ (function (_super) {
    __extends(SchemaEditorItem, _super);
    function SchemaEditorItem() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SchemaEditorItem.prototype.render = function () {
        var value = this.props.value;
        // 动态Component要用大写开头的才会被识别
        var Renderer = ((value === null || value === void 0 ? void 0 : value.type) && ITEMMAP[value === null || value === void 0 ? void 0 : value.type]) || SchemaEditorItemCommon;
        return (React__default.createElement(Renderer, __assign({}, this.props, { key: (value === null || value === void 0 ? void 0 : value.type) || 'string' })));
    };
    return SchemaEditorItem;
}(React__default.Component));

export { SchemaEditorItem };
