<ul hx-swap-oob="afterbegin:#newsflash-notifications-container">
    {% for notification in notifications %}
        <li
            class="newsflash-notification"
            x-init="
                setTimeout(() => {
                    $el.classList.add('notification-out');
                    $el.addEventListener('animationend', () => $el.remove());
                }, {{ notification.duration }});
            "
            x-transition
        >
            <p>{{ notification.message }}</p>
        </li>
    {% endfor %}
</ul>