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_const = require("../const.js");
let _pisell_utils = require("@pisell/utils");
//#region src/components/eftposPay/adyenPos/const.ts
const _excluded = [
	"order_id",
	"name",
	"symbol",
	"amount",
	"mode",
	"number",
	"pay",
	"device",
	"net",
	"client"
];
/**
* 初始步骤配置
* Adyen 仅一个 loading 步骤，支付结果由 API 回调驱动
*/
const getStep = (mode = require_const.ModeEnum.Pay) => [{
	key: Date.now(),
	title: _pisell_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
	text: _pisell_utils.locales.getText("page.eftpos-pay.text.waiting.processing"),
	warn: "",
	tip: _pisell_utils.locales.getText("page.eftpos-pay.text.processing"),
	status: require_const.StatusEnum.Loading
}];
/**
* Adyen 常规支付初始 State 工厂
*
* 与 huifu 模式相同：
*   - Pay / FullPay → Init 状态（先展示操作 UI，等待用户触发支付）
*   - Refund / Query → Loading 状态（直接发起请求）
*/
const getAdyenInitState = (params) => {
	const _ref = params || { mode: require_const.ModeEnum.Pay }, { order_id, name, symbol, amount, mode, number, pay, device, net, client } = _ref, other = require_objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
	mode === require_const.ModeEnum.Pay || require_const.ModeEnum.FullPay;
	return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
		order_id,
		name,
		symbol,
		amount,
		mode,
		eftpos: require_const.EftposEnum.AdyenPos,
		key: Date.now(),
		step: 0,
		type: require_const.PayRouteEnum.Step,
		title: _pisell_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
		component: "",
		status: require_const.StatusEnum.Loading,
		steps: getStep(mode),
		render: true,
		client: client !== "undefined" && client !== void 0 ? client : require_const.ClientEnum.Merchant,
		warn: "",
		custom: other || {}
	}, typeof net !== "undefined" ? { net } : {}), typeof number !== "undefined" ? { number } : {}), typeof pay !== "undefined" ? { pay } : {}), typeof device !== "undefined" ? { device } : {});
};
//#endregion
exports.default = getAdyenInitState;
