import React, { forwardRef, useImperativeHandle, useState } from "react";
import { locales } from "@pisell/utils";
import { Icon, PisellModal } from "@pisell/materials";
import "./index.less";
//#region src/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.tsx
const WalletAvailable = (props, ref) => {
	const { walletSetting, onOk } = props;
	const [open, setOpen] = useState(false);
	useImperativeHandle(ref, () => {
		return { open: () => {
			setOpen(true);
		} };
	});
	return /* @__PURE__ */ React.createElement(PisellModal, {
		title: locales.getText("tocPay.text.walletPassAvailable")(walletSetting.name),
		open,
		okText: locales.getText("tocPay.text.useWalletPassAdd")(walletSetting.name),
		cancelText: locales.getText("tocPay.text.skipAndContinueToPayment"),
		wrapClassName: "toc-pay-wallet-available-modal",
		footerDivider: false,
		headerDivider: false,
		onCancel: () => {
			setOpen(false);
		},
		onOk: () => {
			setOpen(false);
			onOk();
		},
		mobileModalHeight: "auto",
		cancelButtonProps: { style: {
			border: "none",
			color: "#40484F",
			textAlign: "center",
			fontSize: "14px",
			fontWeight: "400",
			lineHeight: "20px",
			boxShadow: "none"
		} }
	}, /* @__PURE__ */ React.createElement("div", { className: "toc-pay-wallet-available-modal-icon" }, /* @__PURE__ */ React.createElement(Icon, { type: "pisell2-a-wallet-021" })), /* @__PURE__ */ React.createElement("div", { className: "toc-pay-wallet-available-modal-describe" }, locales.getText("tocPay.text.addPointsCard")));
};
var WalletAvailable_default = forwardRef(WalletAvailable);
//#endregion
export { WalletAvailable_default as default };
