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