@props(['articles', 'variant' => 'banner', 'title' => 'Może pomogą te artykuły z bazy wiedzy', 'showCopy' => false]) @php $icons = ['book' => 'menu_book', 'chapter' => 'bookmark', 'bookshelf' => 'library_books', 'page' => 'article']; $isSidebar = $variant === 'sidebar'; @endphp @if (count($articles))
@if ($isSidebar)
{{ $title }}
@else
auto_awesome {{ $title }}
@endif
@foreach ($articles as $article)
{{ $icons[$article['type']] ?? 'article' }} {{ $article['name'] }} @if (! empty($article['book']) && $article['book'] !== $article['name']) {{ ! empty($article['shelf']) ? $article['shelf'].' > '.$article['book'] : $article['book'] }} @endif @if ($showCopy) @endif
@endforeach
@endif