<?php
$flashMessages = all_flashes();
?>
<?php if ($flashMessages !== []): ?>
    <div class="flash-stack mb-4">
        <?php foreach ($flashMessages as $flash): ?>
            <?php if (is_array($flash)): ?>
                <div class="alert alert-<?php echo e($flash['type'] ?? 'info'); ?> alert-dismissible fade show shadow-sm border-0" role="alert">
                    <?php echo e($flash['message'] ?? ''); ?>
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            <?php endif; ?>
        <?php endforeach; ?>
    </div>
<?php endif; ?>