{{-- Show top level books item --}}
@if (count($crumbs) > 0 && ($crumbs[0] ?? null) instanceof \BookStack\Entities\Models\Book)
@icon('books')
{{ trans('entities.books') }}
@endif
{{-- Show top level shelves item --}}
@if (count($crumbs) > 0 && ($crumbs[0] ?? null) instanceof \BookStack\Entities\Models\Bookshelf)
@icon('bookshelf')
{{ trans('entities.shelves') }}
@endif
@foreach($crumbs as $key => $crumb)
@if (is_null($crumb))
@endif
@if ($breadcrumbCount !== 0 && !$isEntity)
@icon('chevron-right')
@endif
@if (is_string($crumb))
{{ $crumb }}
@elseif (is_array($crumb))
@icon($crumb['icon'])
{{ $crumb['text'] }}
@elseif($isEntity && userCan('view', $crumb))
@if($breadcrumbCount > 0)
@include('entities.breadcrumb-listing', ['entity' => $crumb])
@endif
@icon($crumb->getType())
{{ $crumb->getShortName() }}
@endif
@endforeach