"use client";
//#region packages/@mantine/core/src/components/Slider/utils/get-change-value/get-change-value.ts
function getChangeValue({ value, containerWidth, min, max, step, precision }) {
	const dx = (!containerWidth ? value : Math.min(Math.max(value, 0), containerWidth) / containerWidth) * (max - min);
	const nextValue = (dx !== 0 ? Math.round(dx / step) * step : 0) + min;
	const nextValueWithinStep = Math.max(nextValue, min);
	if (precision !== void 0) return Number(nextValueWithinStep.toFixed(precision));
	return nextValueWithinStep;
}
//#endregion
exports.getChangeValue = getChangeValue;

//# sourceMappingURL=get-change-value.cjs.map