'use strict';

const jsxRuntime = require('react/jsx-runtime');
const form = require('../../form.cjs');
const textarea = require('../../textarea.cjs');
const label = require('../common/label.cjs');
const tooltip = require('../common/tooltip.cjs');

function AutoFormTextarea({
  label: label$1,
  isRequired,
  fieldConfigItem,
  fieldProps
}) {
  const { showLabel: _showLabel, ...fieldPropsWithoutShowLabel } = fieldProps;
  const showLabel = _showLabel === void 0 ? true : _showLabel;
  return /* @__PURE__ */ jsxRuntime.jsxs(form.FormItem, { children: [
    showLabel && /* @__PURE__ */ jsxRuntime.jsx(
      label,
      {
        label: fieldConfigItem?.label || label$1,
        isRequired
      }
    ),
    /* @__PURE__ */ jsxRuntime.jsx(form.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(textarea.Textarea, { ...fieldPropsWithoutShowLabel }) }),
    /* @__PURE__ */ jsxRuntime.jsx(tooltip, { fieldConfigItem }),
    /* @__PURE__ */ jsxRuntime.jsx(form.FormMessage, {})
  ] });
}

module.exports = AutoFormTextarea;
