@props(['noticia', 'pathSystem', 'angraDefault'])

<div class="news-item" onclick="window.open('{{ route('paginas.slug', [date('d-m-Y', strtotime($noticia->created_at)), $noticia->slug]) }}', '_blank');">
    <div class="news-image">
        <img src="{{ file_exists($pathSystem . $noticia->featuredPhoto) ? asset($noticia->featuredPhoto) : asset($angraDefault) }}" alt="{{ $noticia->title }}">
    </div>
    <div class="news-content">
        <h4 class="news-title">{{ Str::limit($noticia->title, 50) }}</h4>
        <p class="news-summary text-muted">{{ Str::limit($noticia->summary, 80) }}</p>
        <small class="news-date text-muted">
            <i class="fa-solid fa-calendar me-1"></i>
            {{ date('d/m/Y', strtotime($noticia->created_at)) }}
        </small>
    </div>
    <div class="news-action">
        <i class="fa-solid fa-arrow-right"></i>
    </div>
</div>

