"use client";
import { cn } from "./index3.js";
import { jsx } from "react/jsx-runtime";
import { Field } from "@base-ui/react/field";
import { Fieldset } from "@base-ui/react/fieldset";
//#region src/components/ui/field.tsx
/**
* Field.Root - Groups all parts of a field with validation support.
* Renders a <div> element.
*/
function FieldRoot({ className, ...props }) {
	return /* @__PURE__ */ jsx(Field.Root, {
		"data-slot": "field-root",
		className: cn("flex w-full flex-col gap-1.5", className),
		...props
	});
}
/**
* Field.Label - An accessible label associated with the field control.
* Renders a <label> element.
*/
function FieldLabel({ className, ...props }) {
	return /* @__PURE__ */ jsx(Field.Label, {
		"data-slot": "field-label",
		className: cn("text-sm font-medium leading-5 text-secondary-foreground", "data-[disabled]:opacity-50", className),
		...props
	});
}
/**
* Field.Control - The form control element (input, textarea, select, etc.).
* Passes validation props to the child control.
*/
function FieldControl({ className, ...props }) {
	return /* @__PURE__ */ jsx(Field.Control, {
		"data-slot": "field-control",
		className: cn(className),
		...props
	});
}
/**
* Field.Description - A description that provides additional context.
* Renders a <p> element.
*/
function FieldDescription({ className, ...props }) {
	return /* @__PURE__ */ jsx(Field.Description, {
		"data-slot": "field-description",
		className: cn("text-muted-foreground text-sm leading-5", className),
		...props
	});
}
/**
* Field.Error - Displays validation error messages.
* Only renders when the field is invalid.
* Renders a <span> element.
*/
function FieldError({ className, ...props }) {
	return /* @__PURE__ */ jsx(Field.Error, {
		"data-slot": "field-error",
		className: cn("text-destructive text-sm font-normal", className),
		...props
	});
}
Field.Validity;
/**
* Fieldset.Root - Groups related fields with a legend.
* Renders a native <fieldset> element.
*/
function FieldsetRoot({ className, ...props }) {
	return /* @__PURE__ */ jsx(Fieldset.Root, {
		"data-slot": "fieldset-root",
		className: cn("flex flex-col gap-6 border-0 p-0 m-0", "has-[>[data-slot=checkbox-group]]:gap-3", "has-[>[data-slot=radio-group]]:gap-3", className),
		...props
	});
}
/**
* Fieldset.Legend - An accessible label for the fieldset.
* Renders a <div> element (not native legend for styling flexibility).
*/
function FieldsetLegend({ className, ...props }) {
	return /* @__PURE__ */ jsx(Fieldset.Legend, {
		"data-slot": "fieldset-legend",
		className: cn("mb-3 text-base font-medium leading-6", className),
		...props
	});
}
FieldRoot.displayName = "FieldRoot";
FieldLabel.displayName = "FieldLabel";
FieldControl.displayName = "FieldControl";
FieldDescription.displayName = "FieldDescription";
FieldError.displayName = "FieldError";
FieldsetRoot.displayName = "FieldsetRoot";
FieldsetLegend.displayName = "FieldsetLegend";
//#endregion
export { FieldsetLegend, FieldsetRoot };

//# sourceMappingURL=index25.js.map