const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_index = require("../../locales/index.js");
const require_index$1 = require("../pisellModal/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/pisellQrcode/index.tsx
const PisellQrcode = (props) => {
	const { size, platform, value = "", className } = props;
	const [open, setOpen] = (0, react.useState)(false);
	(0, react.useEffect)(() => {
		document.body.id = "body";
	}, []);
	(0, react.useRef)(null);
	(0, react.useEffect)(() => {
		if (open) {}
	}, [open]);
	const modalProps = {
		title: require_index.getText("pisellQrcode-qrcode"),
		platform,
		onCancel: () => setOpen(false),
		open,
		footer: null,
		mobileModalHeight: "auto",
		className: (0, classnames.default)("pisell-qrcode-modal"),
		bodyStyle: { padding: 0 }
	};
	return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("pisell-qrcode-wrapper", className) }, /* @__PURE__ */ react.default.createElement("div", { onClick: (e) => {
		e.stopPropagation();
		setOpen(true);
	} }, /* @__PURE__ */ react.default.createElement(antd.QRCode, {
		size,
		value,
		bordered: false
	})), /* @__PURE__ */ react.default.createElement(require_index$1.default, modalProps, /* @__PURE__ */ react.default.createElement(antd.QRCode, {
		size: 200,
		value,
		style: { marginTop: 24 }
	}), /* @__PURE__ */ react.default.createElement("p", { className: (0, classnames.default)("pisell-qrcode-modal-value") }, value), /* @__PURE__ */ react.default.createElement(antd.Divider, null), /* @__PURE__ */ react.default.createElement(antd.Button, {
		onClick: () => setOpen(false),
		className: (0, classnames.default)("pisell-qrcode-modal-button")
	}, require_index.getText("pisellQrcode-done"))));
};
//#endregion
exports.default = PisellQrcode;
