const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_payLog = require("../../utils/payLog.js");
const require_index = require("../header/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
//#region src/components/eftposPay/component/fail/network.tsx
/**
* @title: 断网(客户端)提示页
* @Author: hongbing.wang
* @Date: 2024-08-20 11:40
*/
var network_default = ({ className = "" }) => {
	const [hasBtn, setBtn] = (0, react.useState)(false);
	(0, react.useEffect)(() => {
		require_payLog.default.log("断网提示页展示");
		const clear = setTimeout(() => {
			setBtn(true);
		}, 1e3);
		return () => {
			clearTimeout(clear);
		};
	}, []);
	/**
	* @title: 重新连接
	* @description: 只做提示
	* @Author: hongbing.wang
	* @Date: 2024-08-20 11:41
	*/
	const onReconnect = () => {
		require_payLog.default.log("断网提示页：点击重新连接");
		antd.message.open({
			key: "net-warning",
			type: "loading",
			content: _pisell_utils.locales.getText("page.eftpos-pay.text.reconnecting")
		});
	};
	return /* @__PURE__ */ react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ react.default.createElement(require_index.default, { status: "warn" }), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, _pisell_utils.locales.getText("page.eftpos-pay.text.network.disconnected")), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, _pisell_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.title"), " ", /* @__PURE__ */ react.default.createElement("br", null), _pisell_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.connection"), /* @__PURE__ */ react.default.createElement("br", null), _pisell_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.router"), /* @__PURE__ */ react.default.createElement("br", null), _pisell_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.forget.reconnect")), hasBtn ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ react.default.createElement(antd.Button, {
		block: true,
		className: "pisell-lowcode__eft-pay-step-item-btn",
		onClick: onReconnect
	}, _pisell_utils.locales.getText("page.eftpos-pay.text.reconnect.network"))) : null);
};
//#endregion
exports.default = network_default;
