@php
    $noticias = $noticias ?? [];
    $pathSystem = $pathSystem ?? $_SERVER['DOCUMENT_ROOT'] . "/";
    $angraDefault = $angraDefault ?? asset("/pmar/assets/img/angra-default.png");
@endphp

<div class="dashboard-card">
    <div class="dashboard-card-header">
        <h3 class="dashboard-card-title">
            <i class="fa-solid fa-clock-rotate-left me-2"></i>
            {{ __("Últimas Notícias") }}
        </h3>
    </div>
    <div class="dashboard-card-body">
        <div class="news-list">
            @forelse($noticias as $noticia)
                @include('components.dashboard._newsItem', [
                    'noticia' => $noticia,
                    'pathSystem' => $pathSystem,
                    'angraDefault' => $angraDefault
                ])
            @empty
                <div class="news-empty">
                    <i class="fa-solid fa-inbox fa-3x text-muted mb-3"></i>
                    <p class="text-muted">{{ __("Nenhuma notícia publicada") }}</p>
                </div>
            @endforelse
        </div>
    </div>
</div>