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

import { __assign } from 'tslib';
import React__default from 'react';
import { themeable, localeable } from 'amis-core';
import InputJSONSchemaItem from './Item.js';

function InputJSONSchema(props, ref) {
    var schema = props.schema || {
        type: 'object',
        properties: {}
    };
    var childRef = React__default.useRef();
    React__default.useImperativeHandle(ref, function () {
        return {
            validate: function () {
                var _a;
                return (_a = childRef.current) === null || _a === void 0 ? void 0 : _a.validate();
            }
        };
    });
    return React__default.createElement(InputJSONSchemaItem, __assign({}, props, { schema: schema, ref: childRef }));
}
var InputJSONSchema$1 = themeable(localeable(React__default.forwardRef(InputJSONSchema)));

export { InputJSONSchema$1 as default };
