import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useEffect } from "react";
import { ToastContainer, toast } from "react-toastify";
import "./style.scss";
const WelecomeToastComponent = ({ toastText1 = "🦄 Wow so easy!", toastText2 = "🦄 Wow so easy!", showToast = false, delay = 5000, }) => {
    console.log("Welcome to Prospect");
    const notify = () => toast(_jsxs("div", { className: "welcomeToast--body", children: [toastText1, _jsx("span", { children: toastText2 })] }), {
        position: "top-right",
        autoClose: delay,
        hideProgressBar: true,
        closeOnClick: true,
        pauseOnHover: false,
        draggable: true,
        progress: undefined,
        theme: "dark",
    });
    useEffect(() => {
        let id;
        if (showToast) {
            id = notify();
        }
        if (id)
            return () => toast.dismiss(id);
    }, [showToast]);
    return (_jsx("div", { children: _jsx(ToastContainer, { limit: 1 }) }));
};
export default WelecomeToastComponent;
