const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_useEngineContext = require("../../../../hooks/useEngineContext.js");
const require_locales = require("../../locales.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/plus/productSelect/components/pisellPriceText/index.tsx
const index = (props) => {
	var _context$appHelper$ut;
	const context = require_useEngineContext.default();
	const { value, customPrefixText, customSuffixText } = props;
	const locale = ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get("umi_locale")) || "en";
	const [_prefix, _suffix] = (0, react.useMemo)(() => {
		if (!props.isMini) return ["", ""];
		const localText = require_locales.default[locale] || require_locales.default.en;
		return [customPrefixText || localText["pisell2.product-select.price.prefix"] || "From", customSuffixText || localText["pisell2.product-select.price.suffix"] || ""];
	}, [
		props.isMini,
		customPrefixText,
		customSuffixText,
		locale
	]);
	return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("pisell-price-text", props.className) }, props.prefix, _prefix ? /* @__PURE__ */ react.default.createElement("span", {
		className: "pisell-price-text-prefix-text",
		style: {
			fontSize: "0.65em",
			marginRight: 4
		}
	}, _prefix) : null, /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellText.Amount, { value }), _suffix ? /* @__PURE__ */ react.default.createElement("span", {
		style: {
			fontSize: "0.65em",
			marginLeft: 4
		},
		className: "pisell-price-text-suffix-text"
	}, _suffix) : null, props.suffix);
};
//#endregion
exports.default = index;
