{% if messages %}
    {% for message in messages %}
            
<script>
    const Toast = Swal.mixin({
    toast: true,
    position: "top-end",
    showConfirmButton: false,
    timer: 2000,
    timerProgressBar: true,
        didOpen: (toast) => {
        toast.onmouseenter = Swal.stopTimer;
        toast.onmouseleave = Swal.resumeTimer;
        }
    });
    Toast.fire({
        icon: "{{ message.tags }}",
        titleText: "{{ message| safe }}"
});
</script>
        
    {% endfor %}
{% endif %}