import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__AutoScalingText_mjs__ from "./AutoScalingText.mjs";
const CalculatorDisplay = (param)=>{
    let { value, ...props } = param;
    const language = navigator.language || 'en-US';
    let formattedValue = parseFloat(value).toLocaleString(language, {
        useGrouping: true,
        maximumFractionDigits: 6
    });
    const match = value.match(/\.\d*?(0*)$/);
    if (match) formattedValue += /[1-9]/.test(match[0]) ? match[1] : match[0];
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
        ...props,
        className: "calculator-display",
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__AutoScalingText_mjs__.AutoScalingText, {
            children: formattedValue
        })
    });
};
export { CalculatorDisplay };
