import { jsx } from "react/jsx-runtime";
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, {
    minRows,
    style,
    ...props
  }) => {
    const inputProps = useFieldControl({
      ...props,
      fieldMetadata,
      parse,
      format
    });
    return /* @__PURE__ */ jsx(
      TextareaInput,
      {
        ...inputProps,
        minRows: minRows || 3,
        style
      }
    );
  },
  "TextareaField"
);
const TextAreaField = SimpleRelativeSingleField(
  (fieldMetadata, {
    minRows,
    style,
    ...props
  }) => {
    const inputProps = useFieldControl({
      ...props,
      fieldMetadata,
      parse,
      format
    });
    return /* @__PURE__ */ jsx(
      TextareaInput,
      {
        ...inputProps,
        minRows: minRows || 3,
        style
      }
    );
  },
  "TextAreaField"
);
export {
  TextAreaField,
  TextareaField
};
//# sourceMappingURL=TextareaField.js.map
