import { n as cn } from "./utils-DXzSsU1e.js";
import { createElementBlock, defineComponent, mergeModels, normalizeClass, openBlock, unref, useModel, vModelText, withDirectives } from "vue";
//#region src/components/ui/textarea/Textarea.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = ["rows", "cols"];
//#endregion
//#region src/components/ui/textarea/Textarea.vue
var Textarea_default = /* @__PURE__ */ defineComponent({
	__name: "Textarea",
	props: /* @__PURE__ */ mergeModels({
		defaultValue: {},
		modelValue: {},
		class: { type: [
			Boolean,
			null,
			String,
			Object,
			Array
		] },
		rows: { default: 3 },
		cols: {}
	}, {
		"modelValue": { default: void 0 },
		"modelModifiers": {}
	}),
	emits: ["update:modelValue"],
	setup(__props) {
		const props = __props;
		const modelValue = useModel(__props, "modelValue");
		if (modelValue.value === void 0 && props.defaultValue !== void 0) modelValue.value = props.defaultValue;
		return (_ctx, _cache) => {
			return withDirectives((openBlock(), createElementBlock("textarea", {
				"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
				rows: __props.rows,
				cols: __props.cols,
				class: normalizeClass(unref(cn)("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", props.class))
			}, null, 10, _hoisted_1)), [[vModelText, modelValue.value]]);
		};
	}
});
//#endregion
export { Textarea_default as t };

//# sourceMappingURL=textarea-Bi7Nstc4.js.map