"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormTreeLikeAsyncAutocomplete = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const TreeLikeAsyncAutocomplete_1 = require("../../components/TreeLikeAsyncAutocomplete");
const useFormFieldProps_1 = require("../useFormFieldProps");
/**
 * Обертка TreeLikeAsyncAutocomplete для формы
 */
const FormTreeLikeAsyncAutocomplete = (props) => {
    const { error, ...fieldProps } = (0, useFormFieldProps_1.useFormFieldProps)({
        ...props,
        defaultValue: props.defaultValue || '',
    });
    return (0, jsx_runtime_1.jsx)(TreeLikeAsyncAutocomplete_1.TreeLikeAsyncAutocomplete, { isError: error, ...fieldProps });
};
exports.FormTreeLikeAsyncAutocomplete = FormTreeLikeAsyncAutocomplete;
