@extends('layouts.app') @section('title', $match->home_team_name_en . ' vs ' . $match->away_team_name_en) @section('content')
{{ __('messages.back_to_home') }}
{{ __('messages.match_details') }}
{{ $match->league->name_en ?? 'Football' }}
{{ $match->match_date->format('d M Y - H:i') }}

{{ $match->home_team_name_en }}

{{ $match->home_score ?? 0 }} : {{ $match->away_score ?? 0 }}
@if($match->status == 'FT') {{ __('messages.finished') }} @elseif(is_numeric($match->status)) {{ __('messages.live') }} {{ $match->status }}' @else @php $statusKey = strtolower($match->status); $translatedStatus = __('messages.' . $statusKey); @endphp {{ $translatedStatus !== 'messages.' . $statusKey ? $translatedStatus : $match->status }} @endif

{{ $match->away_team_name_en }}

{{ __('messages.venue_info') }}

{{ $match->venue ?? 'N/A' }}
{{ $match->city ?? 'N/A' }}

{{ __('messages.match_status') }}

@if($match->status == 'FT') {{ __('messages.full_time_result') }} @elseif($match->status == 'NS') {{ __('messages.not_started') }} @else {{ __('messages.in_progress') }} @endif
{{ __('messages.fixture_id') }}: {{ $match->api_fixture_id }}

{{ __('messages.match_events') }}

@if(isset($match->raw_json['events']) && count($match->raw_json['events']) > 0)
@foreach($match->raw_json['events'] as $event)
{{ $event['time']['elapsed'] }}
{{ $event['player']['name'] }} @if($event['type'] == 'Goal') @elseif($event['type'] == 'Card') @endif
{{ $event['team']['name'] }} • {{ $event['detail'] }} @if(isset($event['assist']['name'])) • {{ __('messages.assist') }}: {{ $event['assist']['name'] }} @endif
@endforeach
@else

{{ __('messages.no_events') }}

@endif
@if(isset($match->raw_json['lineups']) && count($match->raw_json['lineups']) > 0)
@foreach($match->raw_json['lineups'] as $lineup)

{{ $lineup['team']['name'] }}

{{ $lineup['formation'] }}
{{ __('messages.starting_xi') }}
@foreach($lineup['startXI'] as $player)
{{ $player['player']['number'] }} {{ $player['player']['name'] }}
{{ $player['player']['pos'] }}
@endforeach
@endforeach
@endif
@endsection