import { createElement } from "react";
import { TextareaInput } from "@contember/ui";
import { useFieldControl } from "./useFieldControl.js";
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__ */ createElement(TextareaInput, {
    ...inputProps,
    minRows: minRows || 3
  });
}, "TextareaField");
const TextAreaField = SimpleRelativeSingleField((fieldMetadata, {
  label,
  minRows,
  ...props
}) => {
  {
    console.warn("TextAreaField is deprecated. Plese use TextareaField to align with HTML/UI naming of components");
  }
  const inputProps = useFieldControl({
    ...props,
    fieldMetadata,
    parse,
    format
  });
  return /* @__PURE__ */ createElement(TextareaInput, {
    ...inputProps,
    minRows: minRows || 3
  });
}, "TextAreaField");
export { TextAreaField, TextareaField };
//# sourceMappingURL=TextareaField.js.map
