const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_useEngineContext = require("../../../../hooks/useEngineContext.js");
const require_CashKeyboardSimple = require("./CashKeyboardSimple.js");
const require_CashKeyboardIntact = require("./CashKeyboardIntact.js");
const require_locales = require("./locales.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let ahooks = require("ahooks");
//#region src/pro/priceKeyboard/components/cashKeyboard/index.tsx
const _excluded = [
	"variant",
	"value",
	"onChange",
	"shortcutsSize"
];
const CashKeyboard = (props) => {
	var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4;
	const context = require_useEngineContext.default();
	_pisell_utils.locales.init(require_locales.default, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get("umi_locale")) || "en");
	const { getData } = context.appHelper.utils;
	const amountSymbol = props.amountSymbol || (getData === null || getData === void 0 ? void 0 : getData("shop_symbol")) || "$";
	const { variant = "intact", value, onChange, shortcutsSize } = props, otherProps = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const [internalValue, setInternalValue] = (0, ahooks.useControllableValue)(props);
	if (variant === "intact") return /* @__PURE__ */ react.default.createElement(require_CashKeyboardIntact.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherProps), {}, {
		amountSymbol,
		value: internalValue,
		placeholder: `${amountSymbol}0`,
		onChange: setInternalValue,
		shortcutsSize
	}));
	return /* @__PURE__ */ react.default.createElement(require_CashKeyboardSimple.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, otherProps), {}, {
		amountSymbol,
		placeholder: `${amountSymbol}0`,
		value: internalValue,
		onChange: setInternalValue
	}));
};
//#endregion
exports.default = CashKeyboard;
