@extends('layouts.main') @section('content')
@php if (Request::segment(2)) { $teamType = $team->blue_team == Request::segment(2) ? 'blue' : 'red'; } else { $teamType = 'spectator'; } $roomId = Request::segment(1); $teamData = json_decode($team->data, true); $time = ''; if ($teamData && (isset($teamData['blue_team_time']) || isset($teamData['red_team_time']))) { $currentTime = \Carbon\Carbon::now(); $oldTime = isset($teamData['blue_team_time']) ? new \Carbon\Carbon($teamData['blue_team_time']) : new \Carbon\Carbon($teamData['red_team_time']); $time = $currentTime->diffInSeconds($oldTime); } $newChampArr = []; if ($teamData) { foreach (['red_team', 'blue_team'] as $teamVal) { foreach ($teamData[$teamVal] as $key => $championId) { if (!empty($championId)) { foreach ($champions as $champion) { if ($champion->id == $championId) { if (in_array($key, ['champion_8, champion_9, champion_12, champion_17, champion_20, champion_7, champion_10, champion_11, champion_18, champion_19'])) { $newChampArr[$key] = $champion->splash ?? $champion->image_name.'_0.jpg'; } else { $newChampArr[$key] = $champion->tiles ?? $champion->image_name.'_0.jpg'; } break; } elseif ($championId == 'empty') { $newChampArr[$key] = 'empty'; break; } } } } } } $teamSoundId = $teamType.'_sound'; $teamSizeId = $teamType.'_size'; $imageSizeType = $team->$teamSizeId == 'Large' ? 'splash' : 'tiles'; @endphp {{-- --}}
@include('panel.waiting-page')
{{ $team->blue_name }}
{{ $team->red_name }}
@php $leftChampions = ['champion_7', 'champion_10', 'champion_11', 'champion_18', 'champion_19']; @endphp @foreach ($leftChampions as $key => $leftChampion)
@if (isset($newChampArr[$leftChampion]) && $newChampArr[$leftChampion] && $newChampArr[$leftChampion] == 'empty') @elseif (isset($newChampArr[$leftChampion]) && $newChampArr[$leftChampion]) @else @endif {{--
--}}
@endforeach
@php $importCondition = $teamType != 'spectator' && in_array($team->type, ['Fearless', 'HardFearless']) && ((isset($teamData) && $teamData[$teamType.'_team_status'] == 'ready') || !isset($teamData)); $filterItems = ['both', 'blue', 'red', 'cancel']; @endphp
@if ($importCondition)
@endif @if (in_array($team->type, ['Fearless', 'HardFearless'])) {{--
@php $banName = $teamType.'_ban'; @endphp
--}} @endif
@include('panel.champions')
@php $rightChampions = ['champion_8', 'champion_9', 'champion_12', 'champion_17', 'champion_20']; @endphp @foreach ($rightChampions as $key => $rightChampion)
@if (isset($newChampArr[$rightChampion]) && $newChampArr[$rightChampion] && $newChampArr[$rightChampion] == 'empty') @elseif (isset($newChampArr[$rightChampion]) && $newChampArr[$rightChampion]) @else @endif
@endforeach
@php $bottomLeftChampions = ['champion_1', 'champion_3', 'champion_5', 'champion_14', 'champion_16']; @endphp @foreach ($bottomLeftChampions as $key => $bottomLeftChampion)
@if (isset($newChampArr[$bottomLeftChampion]) && $newChampArr[$bottomLeftChampion] && $newChampArr[$bottomLeftChampion] == 'empty') @elseif (isset($newChampArr[$bottomLeftChampion]) && $newChampArr[$bottomLeftChampion]) @else @endif
@endforeach
@php $bottomRightChampions = ['champion_15', 'champion_13', 'champion_6', 'champion_4', 'champion_2']; @endphp @foreach ($bottomRightChampions as $key => $bottomRightChampion)
@if (isset($newChampArr[$bottomRightChampion]) && $newChampArr[$bottomRightChampion] && $newChampArr[$bottomRightChampion] == 'empty') @elseif (isset($newChampArr[$bottomRightChampion]) && $newChampArr[$bottomRightChampion]) @else @endif
@endforeach
@endsection