import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { formatCurrency } from "../utils/currencyFormatter.js";
import React from "react";
//#region src/components/pisellCurrency/components/ReadOnlyView.tsx
/**
* PisellCurrency 只读态视图组件
* 
* 负责渲染只读态的纯文本展示
* 
* 功能：
* - 格式化货币数值并展示
* - 添加货币符号（无空格）
* - 支持自定义字体样式
* - 处理空值显示
* 
* @param props 组件 Props
*/
const ReadOnlyView = (props) => {
	const { value, currencySymbol = "¥", symbolPosition = "before", showSymbol = true, precision = 2, useGrouping = true, emptyText = "-", fontSize, fontWeight, color, textAlign = "left", className, style, "aria-label": ariaLabel } = props;
	const displayValue = formatCurrency(value, {
		currencySymbol,
		symbolPosition,
		showSymbol,
		precision,
		useGrouping
	});
	const text = displayValue !== null && displayValue !== void 0 ? displayValue : emptyText;
	const combinedStyle = _objectSpread2({
		fontSize,
		fontWeight,
		color,
		textAlign
	}, style);
	return /* @__PURE__ */ React.createElement("span", {
		className: `pisell-currency pisell-currency-read ${className || ""}`,
		style: combinedStyle,
		"aria-label": ariaLabel
	}, text);
};
//#endregion
export { ReadOnlyView as default };
