@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $isCompleted = $attempt->status === \App\Models\GameAttempt::STATUS_COMPLETED; $isGameOver = $attempt->status === \App\Models\GameAttempt::STATUS_GAME_OVER; $questionsCompleted = $attempt->correct_answers + $attempt->wrong_answers; $totalQuestions = $game->total_levels * $game->questions_per_level; $shareText = __(':score points in :title', ['score' => $attempt->total_score, 'title' => __($game->title)]) . ' ' . ($isCompleted ? __('completed all :levels levels! 🧠🔥', ['levels' => $game->total_levels]) : __('answered :count questions! 🧠', ['count' => $questionsCompleted])); @endphp {{ $isCompleted ? __('Congratulations') : __('Game Over') }} — {{ __($game->title) }} @if($brandStyle)@endif @vite(['resources/css/app.css', 'resources/js/app.js'])
@if($isCompleted)

🎉

{{ __('CONGRATULATIONS') }}

{{ __('Word Master') }}

@else

😔

{{ __('GAME OVER') }}

@endif

{{ number_format($attempt->total_score) }}

{{ __('Points') }}

{{ $attempt->correct_answers }}

✓ {{ __('Correct') }}

{{ $attempt->wrong_answers }} / {{ $game->max_wrong_answers }}

✕ {{ __('Wrong') }}

{{ $attempt->accuracy() }}%

{{ __('Accuracy') }}

🔥 {{ $attempt->best_streak }}

{{ __('Best Streak') }}

{{ __('Questions Completed:') }} {{ $questionsCompleted }} / {{ $totalQuestions }}

@if($isCompleted)

{{ __('Levels Completed:') }} {{ $game->total_levels }} / {{ $game->total_levels }}

@endif @if($rank)

{{ __('Your rank: #:rank', ['rank' => $rank]) }}

@endif @if(! $attempt->guest_name || $attempt->guest_name === 'Guest')
@csrf
@endif