"use client";
const require_get_theme_color = require("../../../core/MantineProvider/color-functions/get-theme-color/get-theme-color.cjs");
const require_get_contrast_color = require("../../../core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs");
const require_get_auto_contrast_value = require("../../../core/MantineProvider/color-functions/get-auto-contrast-value/get-auto-contrast-value.cjs");
const require_MantineThemeProvider = require("../../../core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs");
const require_use_props = require("../../../core/MantineProvider/use-props/use-props.cjs");
const require_factory = require("../../../core/factory/factory.cjs");
const require_Box = require("../../../core/Box/Box.cjs");
const require_Progress_context = require("../Progress.context.cjs");
const require_Progress_module = require("../Progress.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Progress/ProgressSection/ProgressSection.tsx
const defaultProps = { withAria: true };
const ProgressSection = require_factory.factory((props) => {
	const { classNames, className, style, styles, vars, value, withAria, color, striped, animated, mod, ...others } = require_use_props.useProps("ProgressSection", defaultProps, props);
	const ctx = require_Progress_context.useProgressContext();
	const theme = require_MantineThemeProvider.useMantineTheme();
	const ariaAttributes = withAria ? {
		role: "progressbar",
		"aria-valuemax": 100,
		"aria-valuemin": 0,
		"aria-valuenow": value,
		"aria-valuetext": `${value}%`
	} : {};
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...ctx.getStyles("section", {
			className,
			classNames,
			styles,
			style
		}),
		...others,
		...ariaAttributes,
		mod: [{
			striped: striped || animated,
			animated
		}, mod],
		__vars: {
			"--progress-section-size": `${value}%`,
			"--progress-section-color": require_get_theme_color.getThemeColor(color, theme),
			"--progress-label-color": require_get_auto_contrast_value.getAutoContrastValue(ctx.autoContrast, theme) ? require_get_contrast_color.getContrastColor({
				color,
				theme,
				autoContrast: ctx.autoContrast
			}) : void 0
		}
	});
});
ProgressSection.classes = require_Progress_module.default;
ProgressSection.displayName = "@mantine/core/ProgressSection";
//#endregion
exports.ProgressSection = ProgressSection;

//# sourceMappingURL=ProgressSection.cjs.map