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

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var tslib = require('tslib');
var React = require('react');
var amisCore = require('amis-core');
var Item = require('./Item.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
(__react_jsx__["default"] || __react_jsx__).Fragment;
function InputJSONSchema(props, ref) {
    var schema = props.schema || {
        type: 'object',
        properties: {}
    };
    var childRef = React__default["default"].useRef();
    React__default["default"].useImperativeHandle(ref, function () {
        return {
            validate: function () {
                var _a;
                return (_a = childRef.current) === null || _a === void 0 ? void 0 : _a.validate();
            }
        };
    });
    return _J$X_(Item["default"], tslib.__assign({}, props, { schema: schema, ref: childRef }));
}
var InputJSONSchema$1 = amisCore.themeable(amisCore.localeable(React__default["default"].forwardRef(InputJSONSchema)));

exports["default"] = InputJSONSchema$1;
