const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_const = require("../../const.js");
const require_index = require("../../store/index.js");
const require_payLog = require("../../utils/payLog.js");
const require_index$1 = require("../header/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
let ahooks = require("ahooks");
//#region src/components/eftposPay/component/fail/unknow.tsx
/**
* @title: 支付状态未知页面
* @description:
* @Author: hongbing.wang
* @Date: 2024-08-20 11:42
*/
var unknow_default = ({ onChange, className = "" }) => {
	const { form, mode, client } = require_index.useContextData();
	const dispatch = require_index.useDispatch();
	(0, ahooks.useMount)(() => {
		require_payLog.default.log("未知状态处理页展示");
	});
	/**
	* @title: 手动标记
	* @description: 前往手动标记
	* @Author: hongbing.wang
	* @Date: 2024-08-20 11:31
	*/
	const onManually = () => {
		require_payLog.default.log("未知状态处理页：点击手动标记");
		dispatch(require_index.updateState({ manual: {
			title: _pisell_utils.locales.getText("page.eftpos-pay.text.request.unknown.title")(mode),
			text: _pisell_utils.locales.getText("page.eftpos-pay.text.request.unknown.text")(mode)
		} }));
		dispatch(require_index.updateComponent("Manual"));
	};
	const onNotin = () => {
		require_payLog.default.log("未知状态处理页：点击打印小票");
		onChange("print", [], "print_on_timeout");
	};
	(0, react.useEffect)(() => {
		if (form === "Network" || form === "restore") {
			require_payLog.default.log("未知状态处理页：网络终端");
			dispatch(require_index.updateComponent(""));
		}
	}, [form]);
	return /* @__PURE__ */ react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ react.default.createElement(require_index$1.default, { status: "warn" }), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, _pisell_utils.locales.getText("page.eftpos-pay.text.unknown.title")(mode)), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, client === require_const.ClientEnum.Merchant ? _pisell_utils.locales.getText("page.eftpos-pay.text.unknown.text")(mode) : _pisell_utils.locales.getText("page.eftpos-pay.text.transaction.eftpos.fail.other")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, client === require_const.ClientEnum.Merchant ? /* @__PURE__ */ react.default.createElement(antd.Button, {
		block: true,
		className: "pisell-lowcode__eft-pay-step-item-btn",
		onClick: onManually
	}, _pisell_utils.locales.getText("page.eftpos-pay.text.manual.marking")) : /* @__PURE__ */ react.default.createElement(antd.Button, {
		block: true,
		className: "pisell-lowcode__eft-pay-step-item-btn",
		onClick: onNotin
	}, _pisell_utils.locales.getText("page.eftpos-pay.text.manual.print_receipt"))));
};
//#endregion
exports.default = unknow_default;
