"use client";
const require_factory = require("../factory.cjs");
const require_use_field_context = require("./use-field-context.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/field/field-error-text.tsx
var FieldErrorText = (0, react.forwardRef)((props, ref) => {
	const field = require_use_field_context.useFieldContext();
	const mergedProps = (0, _zag_js_react.mergeProps)(field.getErrorTextProps(), props);
	if (field?.invalid) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.span, {
		...mergedProps,
		ref
	});
	return null;
});
FieldErrorText.displayName = "FieldErrorText";
//#endregion
exports.FieldErrorText = FieldErrorText;
