"use client";
import { getEnv } from "../../core/utils/get-env/get-env.mjs";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../core/factory/factory.mjs";
import { InputBase } from "../InputBase/InputBase.mjs";
import { TextareaAutosize } from "./Autosize.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Textarea/Textarea.tsx
const Textarea = factory((props) => {
	const { autosize, maxRows, minRows, __staticSelector, resize, bottomSection, bottomSectionProps, ...others } = useProps([
		"Input",
		"InputWrapper",
		"Textarea"
	], null, props);
	const shouldAutosize = autosize && getEnv() !== "test";
	const autosizeProps = shouldAutosize ? {
		maxRows,
		minRows
	} : {};
	return /* @__PURE__ */ jsx(InputBase, {
		component: shouldAutosize ? TextareaAutosize : "textarea",
		...others,
		__staticSelector: __staticSelector || "Textarea",
		__bottomSection: bottomSection,
		__bottomSectionProps: bottomSectionProps,
		multiline: true,
		"data-no-overflow": autosize && maxRows === void 0 || void 0,
		__vars: { "--input-resize": resize },
		...autosizeProps
	});
});
Textarea.classes = InputBase.classes;
Textarea.displayName = "@mantine/core/Textarea";
//#endregion
export { Textarea };

//# sourceMappingURL=Textarea.mjs.map