document.addEventListener("DOMContentLoaded", () => {
    const flashButtons = document.querySelectorAll(".notification .delete");

    flashButtons.forEach((button) => {
        const flash = button.parentNode;

        if (flash == null) {
            console.error(
                "Unreachable because our `querySelector` includes a parent; something went very wrong"
            );
            return;
        }

        flash.addEventListener("click", () => {
            if (flash == null) {
                console.error("Completely unreachable.");
                return;
            }

            if (flash.parentNode == null) {
                console.error(
                    "Notification not placed in DOM; something went very wrong"
                );
                return;
            }

            flash.parentNode.removeChild(flash);
        });
    });
});

export {};
