@extends('layouts.app') @section('title', __('ui.binder_title').' — Coaster World') @push('head') @endpush @section('content')
{{ __('ui.binder_kicker') }}

{{ __('ui.binder_title') }}

{{ __('ui.binder_intro') }}

{{ $completionPercent }}% {{ __('ui.binder_completion') }}
{{ $ownedCount }} / {{ $totalCount }} {{ __('ui.binder_cards_unlocked') }}
@if($totalCount > 0)
@if($parks->isNotEmpty()) @endif @if($manufacturers->isNotEmpty()) @endif
{{ $totalCount }}{{ __('ui.binder_cards') }}
@if($series->isNotEmpty()) @endif
@foreach($cards as $card) @php $coaster = $card->coaster; $attraction = $card->subjectAttraction(); $park = $attraction?->park; $tr = $attraction?->translations?->firstWhere('locale', app()->getLocale()) ?? $attraction?->translations?->firstWhere('locale', 'en'); $ptr = $park?->translations?->firstWhere('locale', app()->getLocale()) ?? $park?->translations?->firstWhere('locale', 'en'); $name = $tr?->name ?: $attraction?->official_name ?: $card->card_key; $parkName = $ptr?->name ?: $park?->official_name ?: 'Coaster World'; $owned = $card->owners->isNotEmpty(); $frontUrl = $owned ? $card->frontUrl() : null; $lockedPreviewUrl = ! $owned ? $card->lockedPreviewUrl() : null; $backUrl = $owned ? $card->backUrlFor(app()->getLocale()) : null; $canOpen = $owned && $frontUrl !== null; $seriesName = $card->collectionSeriesName() ?: __('ui.binder_series_default'); $seriesSlug = \Illuminate\Support\Str::slug($seriesName ?: 'none'); $manufacturerName = $coaster?->manufacturer?->name ?: '—'; $subjectType = $card->subjectType(); $searchText = mb_strtolower(trim($name.' '.$parkName.' '.$manufacturerName.' '.$seriesName.' '.($card->card_number ?? ''))); @endphp
{{ $card->card_number ? '#'.$card->card_number : $seriesName }} {{ $owned ? $name : __('ui.binder_mystery_card') }} @if($owned && $attraction) @endif {{ $owned ? $parkName : __($subjectType === 'coaster' ? 'ui.binder_unlock_hint' : 'ui.binder_unlock_hint_attraction') }}
@endforeach
@else
🃏

{{ __('ui.binder_empty_title') }}

{{ __('ui.binder_empty_text') }}

{{ __('ui.binder_progression_link') }}
@endif
@endsection