'use client';


import { useFormField } from "./FormField.mjs";
import { jsx } from "react/jsx-runtime";
import { Slot } from "@radix-ui/react-slot";

//#region src/components/Form/FormControl.tsx
const FormControl = (props) => {
	const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
	return /* @__PURE__ */ jsx(Slot, {
		id: formItemId,
		"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
		"aria-invalid": !!error,
		...props
	});
};

//#endregion
export { FormControl };
//# sourceMappingURL=FormControl.mjs.map