import { c } from "react-compiler-runtime";
import "react";
//#region src/hooks/useSplitDecimal.js
/**
*  Split a decimal number into a string, separated the integer part and the decimal
*  e.g "125.46"
*  return { mainLabel: '125', decimalLabel: '46' }
*/
const useSplitDecimal = (value, t0) => {
	const $ = c(11);
	const decimals = t0 === void 0 ? 2 : t0;
	let t1;
	bb0: {
		if (isNaN(value)) {
			let t2;
			if ($[0] !== value) {
				t2 = { mainLabel: value };
				$[0] = value;
				$[1] = t2;
			} else t2 = $[1];
			t1 = t2;
			break bb0;
		}
		const integerLabel = parseInt(value, 10);
		const t2 = parseFloat(value);
		let decimalLabel;
		let t3;
		if ($[2] !== decimals || $[3] !== t2) {
			decimalLabel = (t2 % 1).toFixed(decimals);
			t3 = decimalLabel.substring(decimals);
			$[2] = decimals;
			$[3] = t2;
			$[4] = decimalLabel;
			$[5] = t3;
		} else {
			decimalLabel = $[4];
			t3 = $[5];
		}
		decimalLabel = t3;
		let t4;
		if ($[6] !== decimalLabel || $[7] !== integerLabel) {
			t4 = {
				mainLabel: integerLabel,
				decimalLabel
			};
			$[6] = decimalLabel;
			$[7] = integerLabel;
			$[8] = t4;
		} else t4 = $[8];
		t1 = t4;
	}
	const textValue = t1;
	let t2;
	if ($[9] !== textValue) {
		t2 = { textValue };
		$[9] = textValue;
		$[10] = t2;
	} else t2 = $[10];
	return t2;
};
//#endregion
export { useSplitDecimal };

//# sourceMappingURL=useSplitDecimal.mjs.map