"use client";
const require_factory = require("../factory.cjs");
const require_use_field_context = require("./use-field-context.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
let _zag_js_core = require("@zag-js/core");
//#region src/components/field/field-required-indicator.tsx
var FieldRequiredIndicator = (0, react.forwardRef)(({ fallback, ...props }, ref) => {
	const field = require_use_field_context.useFieldContext();
	if (!field.required) return fallback;
	const mergedProps = (0, _zag_js_core.mergeProps)(field.getRequiredIndicatorProps(), props);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.span, {
		...mergedProps,
		ref,
		children: props.children ?? "*"
	});
});
FieldRequiredIndicator.displayName = "FieldRequiredIndicator";
//#endregion
exports.FieldRequiredIndicator = FieldRequiredIndicator;
