import { jsx as _jsx } from "react/jsx-runtime";
import { TextInput as TextInputUIKIT } from '@gravity-ui/uikit';
import { getValueByPath } from "../../utils/fields.js";
import Base from "../Base/Base.js";
import BaseInput from "../BaseInput/BaseInput.js";
const TextInput = ({ title, name, when, content, onUpdate, defaultValue }) => {
    const value = getValueByPath(content, name) ?? defaultValue ?? '';
    return (_jsx(Base, { when: when, content: content, name: name, onUpdate: onUpdate, defaultValue: defaultValue, children: _jsx(BaseInput, { title: title, children: _jsx(TextInputUIKIT, { name: name, onUpdate: (v) => onUpdate(name, v), value: value }) }) }));
};
export default TextInput;
//# sourceMappingURL=TextInput.js.map
