import { TextareaInput } from "@contember/ui";
import { useFieldControl } from "./useFieldControl.js";
import { jsx } from "react/jsx-runtime";
import { SimpleRelativeSingleField } from "../auxiliary/SimpleRelativeSingleField/SimpleRelativeSingleField.js";
const parse = (value) => value ?? null;
const format = (value) => value ?? null;
const TextareaField = SimpleRelativeSingleField((fieldMetadata, {
  label,
  minRows,
  ...props
}) => {
  const inputProps = useFieldControl({
    ...props,
    fieldMetadata,
    parse,
    format
  });
  return /* @__PURE__ */ jsx(TextareaInput, {
    ...inputProps,
    minRows: minRows || 3
  });
}, "TextareaField");
const TextAreaField = SimpleRelativeSingleField((fieldMetadata, {
  label,
  minRows,
  ...props
}) => {
  const inputProps = useFieldControl({
    ...props,
    fieldMetadata,
    parse,
    format
  });
  return /* @__PURE__ */ jsx(TextareaInput, {
    ...inputProps,
    minRows: minRows || 3
  });
}, "TextAreaField");
export {
  TextAreaField,
  TextareaField
};
//# sourceMappingURL=TextareaField.js.map
