const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectWithoutProperties = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_usePisellConfig = require("../../../pisell-config-provider/hooks/usePisellConfig.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
//#region src/components/pisellText/components/Amount/index.tsx
const _excluded = [
	"value",
	"precision",
	"showCurrencySymbol",
	"useThousandsSeparator",
	"hideDecimalForWholeNumbers",
	"symbol"
];
const Amount = (props) => {
	const { value, precision, showCurrencySymbol, useThousandsSeparator, hideDecimalForWholeNumbers, symbol } = props, others = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const config = require_usePisellConfig.default();
	const amount = (0, react.useMemo)(() => {
		var _config$getSymbolic;
		return (0, _pisell_utils.formatAmountWithOptions)(value, symbol || (config === null || config === void 0 ? void 0 : config.symbol) || (config === null || config === void 0 || (_config$getSymbolic = config.getSymbolic) === null || _config$getSymbolic === void 0 ? void 0 : _config$getSymbolic.call(config)) || "", {
			precision,
			showCurrencySymbol,
			useThousandsSeparator,
			hideDecimalForWholeNumbers
		});
	}, [
		value,
		precision,
		showCurrencySymbol,
		useThousandsSeparator,
		hideDecimalForWholeNumbers,
		config === null || config === void 0 ? void 0 : config.symbol
	]);
	return /* @__PURE__ */ react.default.createElement("span", others, amount);
};
//#endregion
exports.default = Amount;
