import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button } from "antd";
import Modal from "antd/lib/modal";
import { useEffect, useState } from "react";
import { CrossCircle } from "./Icons/CrossCircle";
import { blockExplorerUrl } from "./Links";
const openUrl = (url) => {
    window.open(url, "_new");
};
export const NewcoinRecept = ({ children, visible, onDone, tx }) => {
    const [_visible, _setVisible] = useState(!!visible);
    useEffect(() => {
        tx && _setVisible(true);
    }, [tx]);
    return _jsxs(Modal, { closeIcon: _jsx(CrossCircle, {}), visible: _visible, okText: "Yes", cancelText: "No", onCancel: () => { _setVisible(false); onDone && onDone(); }, 
        // onCancel={() => setMode(STAKE_STEPS.SELECT)}
        // onCancel={() => onCancel && onCancel() }
        cancelButtonProps: { value: "No" }, footer: false, className: "nl-white-box-modal", children: [children, _jsxs("div", { className: "text-center", style: { marginTop: 20 }, children: [_jsx(Button, { className: "nl-button-primary", onClick: () => openUrl(blockExplorerUrl.newcoin(tx)), children: "View on Newcoin" }), _jsx(Button, { className: "nl-button-primary", onClick: () => openUrl(blockExplorerUrl.blocks(tx)), children: "View on Bloks.io" })] })] });
};
//# sourceMappingURL=Recepts.js.map