import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import { ClientEnum, EftposEnum, ModeEnum, PayRouteEnum, StatusEnum } from "../const.js";
import { locales } from "@pisell/utils";
//#region src/components/eftposPay/linkly/const.ts
const _excluded = [
	"order_id",
	"name",
	"symbol",
	"amount",
	"mode",
	"number",
	"pay",
	"device",
	"net",
	"client"
];
const getStep = (mode = ModeEnum.Pay) => [{
	key: Date.now(),
	title: locales.getText("page.eftpos-pay.text.loading")(mode),
	text: locales.getText("page.eftpos-pay.text.waiting.processing"),
	warn: "",
	tip: locales.getText("page.eftpos-pay.text.processing"),
	status: StatusEnum.Loading
}];
var const_default = (params) => {
	const _ref = params || { mode: ModeEnum.Pay }, { order_id, name, symbol, amount, mode, number, pay, device, net, client } = _ref, other = _objectWithoutProperties(_ref, _excluded);
	console.log("params =>>>>>> ", params);
	return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
		order_id,
		name,
		symbol,
		amount,
		mode,
		eftpos: EftposEnum.Linkly,
		key: Date.now(),
		step: 0,
		type: PayRouteEnum.Step,
		title: locales.getText("page.eftpos-pay.text.loading")(mode),
		component: "",
		status: StatusEnum.Loading,
		steps: getStep(mode),
		render: true,
		client: client !== "undefined" && client !== void 0 ? client : ClientEnum.Merchant,
		warn: "",
		custom: other || {}
	}, typeof net !== "undefined" ? { net } : {}), typeof number !== "undefined" ? { number } : {}), typeof pay !== "undefined" ? { pay } : {}), typeof device !== "undefined" ? { device } : {});
};
let LinklyActionStatus = /* @__PURE__ */ function(LinklyActionStatus) {
	/** 空 */
	LinklyActionStatus["Empty"] = "Empty";
	/** 取消 */
	LinklyActionStatus["Cancel"] = "Cancel";
	/** 取消中 */
	LinklyActionStatus["CancelWaiting"] = "CancelWaiting";
	/** 签名 */
	LinklyActionStatus["Signature"] = "Signature";
	/** 签名等待中 */
	LinklyActionStatus["SignatureWaiting"] = "SignatureWaiting";
	return LinklyActionStatus;
}({});
//#endregion
export { LinklyActionStatus, const_default as default };
