"use client";
const require_get_size = require("../../core/utils/get-size/get-size.cjs");
const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
const require_use_props = require("../../core/MantineProvider/use-props/use-props.cjs");
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
const require_factory = require("../../core/factory/factory.cjs");
const require_Box = require("../../core/Box/Box.cjs");
const require_Fieldset_module = require("./Fieldset.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Fieldset/Fieldset.tsx
const defaultProps = { variant: "default" };
const varsResolver = require_create_vars_resolver.createVarsResolver((_, { radius }) => ({ root: { "--fieldset-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius) } }));
const Fieldset = require_factory.factory((_props) => {
	const props = require_use_props.useProps("Fieldset", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, legend, variant, children, attributes, ...others } = props;
	const getStyles = require_use_styles.useStyles({
		name: "Fieldset",
		classes: require_Fieldset_module.default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Box.Box, {
		component: "fieldset",
		variant,
		...getStyles("root", { variant }),
		...others,
		children: [legend && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", {
			...getStyles("legend", { variant }),
			children: legend
		}), children]
	});
});
Fieldset.classes = require_Fieldset_module.default;
Fieldset.varsResolver = varsResolver;
Fieldset.displayName = "@mantine/core/Fieldset";
//#endregion
exports.Fieldset = Fieldset;

//# sourceMappingURL=Fieldset.cjs.map