@extends('layouts.ranking', ["data" => $data, "route" => "ranking-players"])
@section("ranking_name", "Player Ranking (Weapons)")
@section('table')
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead class="thead-default">
                <tr class="text-center">
                    <th style="width: 54px;">#</th>
                    <th style="width: 54px;">{{ __("ranking.Rank") }}</th>
                    <th>{{ __("ranking.Nick") }}</th>
                    <th style="width: 15%;">{{ __("ranking.Amount") }}</th>
                </tr>
            </thead>
            <tbody>
            @php $i = $data->currentPage() == 0 ? 0 : ($data->currentPage() * $data->perPage()) - $data->perPage(); @endphp
            @foreach ($data as $user) @php $i++ @endphp
                <tr>
                    <td class="text-center">
                        {{ $i }}
                    </td>
                    <td class="text-center">
                        <img src="/assets/images/ranks/BIGCLASS_{{ $user->LEV + 1 }}.png" class="img-fluid" alt="rank">
                    </td>
                    <td>
                        <a href="{{ route('profile', $user->USN) }}">{{ $user->NICK }}</a>
                    </td>
                    <td>
                        {{ number_format($user->ITEM_COUNT) }}
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
@endsection