const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_GoLogin = require("./GoLogin.js");
const require_types = require("../types.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
require("../index.less");
//#region src/plus/saasRegister/components/VerifyError.tsx
const VerifyErrorContent = (props) => {
	return /* @__PURE__ */ react.default.createElement("div", { className: "pisell-saas-register-form" }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-saas-register-form-main" }, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-saas-register-form-title" }, props.title), props.subtitle ? /* @__PURE__ */ react.default.createElement("div", { className: "pisell-saas-register-form-subtitle" }, props.subtitle) : null), /* @__PURE__ */ react.default.createElement(antd.Button, {
		type: "primary",
		block: true,
		size: "large",
		className: "pisell-saas-register-button margin-top-32",
		onClick: props.onClick
	}, props.buttonText), props.showGoLogin ? /* @__PURE__ */ react.default.createElement(require_GoLogin.default, { onGoLogin: props.onGoLogin }) : null);
};
const VerifyError = (props) => {
	const { status, onBackToRegister } = props;
	if (status === require_types.SRStepStatus.FAILED_EMAIL_REGISTERED) return /* @__PURE__ */ react.default.createElement(VerifyErrorContent, {
		title: _pisell_utils.locales.getText("pisell-saas-register-failed-email-registered-title"),
		buttonText: _pisell_utils.locales.getText("pisell-saas-register-failed-button-text"),
		onClick: onBackToRegister,
		showGoLogin: true,
		onGoLogin: props.onGoLogin
	});
	if (status === require_types.SRStepStatus.FAILED_LINK_EXPIRED) return /* @__PURE__ */ react.default.createElement(VerifyErrorContent, {
		title: _pisell_utils.locales.getText("pisell-saas-register-failed-link-expired-title"),
		subtitle: _pisell_utils.locales.getText("pisell-saas-register-failed-link-expired-subtitle"),
		buttonText: _pisell_utils.locales.getText("pisell-saas-register-failed-button-text"),
		onClick: onBackToRegister,
		showGoLogin: true,
		onGoLogin: props.onGoLogin
	});
	if (status === require_types.SRStepStatus.FAILED_LINK_EMAIL_REGISTERED) return /* @__PURE__ */ react.default.createElement(VerifyErrorContent, {
		title: _pisell_utils.locales.getText("pisell-saas-register-failed-link-email-registered-title"),
		subtitle: _pisell_utils.locales.getText("pisell-saas-register-failed-link-email-registered-subtitle"),
		buttonText: _pisell_utils.locales.getText("pisell-saas-register-failed-link-email-registered-button-text"),
		onClick: props.onGoLogin
	});
	if (status === require_types.SRStepStatus.FAILED_LINK_INVALID) return /* @__PURE__ */ react.default.createElement(VerifyErrorContent, {
		title: _pisell_utils.locales.getText("pisell-saas-register-failed-link-invalid-title"),
		subtitle: _pisell_utils.locales.getText("pisell-saas-register-failed-link-invalid-subtitle"),
		buttonText: _pisell_utils.locales.getText("pisell-saas-register-failed-button-text"),
		onClick: onBackToRegister,
		showGoLogin: true,
		onGoLogin: props.onGoLogin
	});
	return null;
};
//#endregion
exports.default = VerifyError;
