<script src="../assets/js/tag.js"></script>
<script src="../assets/js/modais.js"></script>
<script src="../../../assets/js/modal-helper.js"></script>
<script>

    function showToast(message, variant = '#0d9488') {
            const toast = tag(`
                <div class="toast align-items-center text-white d-flex border-0" role="alert" aria-live="assertive" aria-atomic="true" style="background:${variant};">
                    <div class="toast-body flex-grow-1">
                        ${message}
                    </div>
                    <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
                </div>
            `);
            toastContainer.append(toast);
            const bsToast = new bootstrap.Toast(toast.element, { delay: 3500 });
            bsToast.show();
            toast.element.addEventListener('hidden.bs.toast', () => toast.element.remove());
    }

</script>