"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const uikit_1 = require("@gravity-ui/uikit");
const fields_1 = require("../../utils/fields.js");
const Base_1 = tslib_1.__importDefault(require("../Base/Base.js"));
const BaseInput_1 = tslib_1.__importDefault(require("../BaseInput/BaseInput.js"));
const TextArea = ({ when, title, content, name, onUpdate, defaultValue }) => {
    const value = (0, fields_1.getValueByPath)(content, name) ?? defaultValue ?? '';
    return ((0, jsx_runtime_1.jsx)(Base_1.default, { when: when, content: content, name: name, onUpdate: onUpdate, defaultValue: defaultValue, children: (0, jsx_runtime_1.jsx)(BaseInput_1.default, { title: title, children: (0, jsx_runtime_1.jsx)(uikit_1.TextArea, { value: value, name: name, onUpdate: (v) => onUpdate(name, v), minRows: 3 }) }) }));
};
exports.default = TextArea;
//# sourceMappingURL=TextArea.js.map
