@php $shelves = [ [ 'id' => 'opened', 'title' => __('studio.Recently opened'), 'projects' => $openedProjects, 'stamp' => 'opened_at', ], [ 'id' => 'edited', 'title' => __('studio.Recently edited'), 'projects' => $editedProjects, 'stamp' => 'updated_at', ], ]; @endphp
@foreach ($shelves as $shelf) @if ($shelf['projects']->isEmpty()) @continue @endif

{{ $shelf['title'] }}

@if (empty($paginateShelves)) {{ __('studio.See all') }} @endif
@foreach ($shelf['projects'] as $project) @include('livewire.studio.partials.projectCard', [ 'project' => $project, 'stamp' => $project->{$shelf['stamp']}, 'canExport' => $canExport, ]) @endforeach
@if (! empty($paginateShelves) && (($shelf['id'] === 'opened' && ! empty($openedHasMore)) || ($shelf['id'] === 'edited' && ! empty($editedHasMore)))) @php $moreMethod = $shelf['id'] === 'opened' ? 'loadMoreOpened' : 'loadMoreEdited'; @endphp
{{ __('studio.Loading more projects') }}
@endif
@endforeach