const Toast = Swal.mixin({ toast: true, position: "top-end", showConfirmButton: false, timer: 3000, timerProgressBar: true, background: "#212529", color: "#fff", confirmButtonColor: "#daed2e", didOpen: (toast) => { toast.onmouseenter = Swal.stopTimer; toast.onmouseleave = Swal.resumeTimer; }, customClass: { title: "text-light", content: "text-light", toast: "custom-toast", }, }); function showToast(type, message) { Toast.fire({ icon: type, title: message, }); } // Check for session messages and show toasts