"use client";
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/RollingNumber/DigitColumn.tsx
const STRIP_CELLS = [
	"0",
	"1",
	"2",
	"3",
	"4",
	"5",
	"6",
	"7",
	"8",
	"9",
	"0",
	"1"
];
function DigitColumn({ digit, getStyles, previousDigit, empty, valueDirection }) {
	const digitIndex = parseInt(digit, 10);
	const previousDigitIndex = previousDigit !== null ? parseInt(previousDigit, 10) : digitIndex;
	const animateToIndex = valueDirection === "up" && previousDigit !== null && digitIndex < previousDigitIndex && digitIndex <= 1 ? digitIndex + 10 : digitIndex;
	const direction = digitIndex >= previousDigitIndex ? "up" : "down";
	const digitStyles = getStyles("digit");
	const columnStyles = getStyles("digitColumn");
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
		...digitStyles,
		"data-empty": empty || void 0,
		"aria-hidden": "true",
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
			...columnStyles,
			style: {
				...columnStyles.style,
				transform: `translateY(${-digitIndex}em)`,
				["--rn-roll-from"]: `translateY(${-previousDigitIndex}em)`,
				["--rn-roll-to"]: `translateY(${-animateToIndex}em)`
			},
			"data-direction": direction,
			children: STRIP_CELLS.map((d, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: d }, i))
		}, digit)
	});
}
//#endregion
exports.DigitColumn = DigitColumn;

//# sourceMappingURL=DigitColumn.cjs.map