@extends('layouts.master')
@section('title', 'CrossFire Pharaoh | Player Profile of ' . $user->NICK)
@php $hasLoader = false; @endphp
@section('content')
    <div class="nk-header-title nk-header-title-sm" style="text-align: left;">
        <div class="bg-image op-5">
            <img src="{{ asset("assets/images/profile.jpg") }}" alt="profile banner">
        </div>
        <div class="nk-header-table">
            <div class="container w-100">
                <div class="row nk-social-profile">
                    <div class="col-lg-12">
                        <div class="profile-header-info bg-dark-2 block-border p-10 rounded">
                            <div class="d-flex">
                                <div class="flex-fill mr-5">
                                    <div class="row no-gutters">
                                        <div class="col-lg-6">
                                            <div class="profile-header-block">
                                                <div class="float-left">
                                                    {{--@isset($user->bestRanked)
                                                        @if ($user->bestRanked->MEDAL > 0)
                                                            <img src="/assets/images/ranks/ranked/{{ $user->bestRanked->GRADE }}_{{ $user->bestRanked->MIN_SCORE }}.png" width="60" height="60" class="img-fluid" alt="rank" data-tippy="{{ Helper::game_getRankedMode($user->bestRanked->RANK_MODE_INDEX) }}" data-tippy-arrow="true">
                                                        @else
                                                            <img src="{{ asset("assets/images/ranks/ranked/NO.png") }}" width="60" height="60" class="img-fluid" alt="rank">
                                                        @endif
                                                    @endisset--}}
                                                    <img src="/assets/images/ranks/BIGCLASS_{{ $user->LEV + 1 }}.png" class="img-fluid" alt="rank" style="height: 54px; width: 54px;">
                                                </div>
                                                <div class="d-flex flex-column pl-5" style="padding: 0.1rem;">
                                                    <span style="font-size: 1.6rem; line-height: 1.6rem; "dir="ltr">
                                                        @if (count($user->lastNicks) <= 0)
                                                            {{ $user->NICK }}
                                                        @else
                                                            <div class="dropdown">
                                                                <a class="nk-btn-color-main-1 border-0" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                                    {{ $user->NICK }} <i class="fa fa-fw fa-chevron-down text-warning" style="font-size: 0.8rem; cursor: pointer;"></i>
                                                                </a>
                                                                <div class="dropdown-menu bg-dark-3 block-border block-shadow" aria-labelledby="dropdownMenuButton">
                                                                    <span class="dropdown-header">{{ __("user.knownAs") }}</span>
                                                                    @foreach($user->lastNicks as $name)
                                                                        <span class="dropdown-item-text text-warning">{{ $name->BEF_NICK ?? "N/A" }}</span>
                                                                    @endforeach
                                                                </div>
                                                            </div>
                                                        @endif
                                                    </span>
                                                    <div class="nk-progress nk-count" data-progress="{{ $user->nextLevelPercent }}" data-progress-mask="{$}%" data-nk-mask="{$}%">
                                                        <div class="nk-progress-title mb-2" style="font-size: 0.75rem;">{{ __("user.nextLevel") }}</div>
                                                        <div class="nk-progress-line">
                                                            <div class="bg-main-2" style="transform: translate3d(0px, 0px, 0px);">
                                                                <div class="nk-progress-percent"></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-6 pl-5">
                                            <div class="profile-header-block">
                                                @if(!is_null($user->clan))
                                                    <div class="float-left">
                                                        <div class="clan-image">
                                                            <div class="clan-image-bg" style="background-image: url('/assets/images/clan/BG/BG_{{ $user->clan->clan->MarkLayer01 }}.png')">
                                                                <div class="clan-image-border" style="background-image: url('/assets/images/clan/OUTLINE/OUTLINE_{{ $user->clan->clan->MarkLayer02 }}.png')">
                                                                    <div class="clan-image-logo" style="background-image: url('/assets/images/clan/SYMBOL/SYMBOL_{{ $user->clan->clan->MarkLayer03 }}.png')"></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="d-flex flex-column pl-5 mt-10o">
                                                        <span style="font-size: 1.6rem; line-height: 1.6rem;" data-tippy="{{ strip_tags($user->clan->detail->Intro, "<font>") }}" data-tippy-arrow="true" data-tippy-placement="bottom"><a href="{{ route("clan", $user->clan->ClanKey) }}">{{ $user->clan->detail->Clanname }}</a> </span>
                                                        <span>{{ Helper::game_getClanGrade($user->clan->Grade) }}</span>
                                                    </div>
                                                @else
                                                    <div class="d-flex flex-column">
                                                        <div class="align-self-center text-center">
                                                            <h4>{{ __("user.noClan") }}</h4>
                                                            <p>{{ __("user.noClanDesc") }}</p>
                                                        </div>
                                                    </div>
                                                @endisset
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row no-gutters mt-2">
                                        <div class="col-12">
                                            <div class="nk-tabs">
                                                <ul class="nav nav-tabs" role="tablist">
                                                    <li class="nav-item">
                                                        <a class="nav-link active" href="#tab-overview" role="tab" data-toggle="tab">{{ __("user.General") }}</a>
                                                    </li>
                                                    <li class="nav-item">
                                                        <a class="nav-link" href="#tab-kills" role="tab" data-toggle="tab">{{ __("user.Kills") }}</a>
                                                    </li>
                                                    <li class="nav-item">
                                                        <a class="nav-link" href="#tab-matches" role="tab" data-toggle="tab">{{ __("user.Matches") }}</a>
                                                    </li>
                                                </ul>
                                                <div class="tab-content">
                                                    <div role="tabpanel" class="tab-pane fade show active" id="tab-overview">
                                                        <div class="table-responsive mt-10">
                                                            <table class="table table-bordered m-0">
                                                                <thead class="thead-default text-center">
                                                                    <tr>
                                                                        <th>{{ __("user.EXP") }}</th>
                                                                        <th>{{ __("user.GP") }}</th>
                                                                        <th>{{ __("user.ZPBUY") }}</th>
                                                                        <th>{{ __("user.LastConnect") }}</th>
                                                                        <th>{{ __("user.RegisterDate") }}</th>
                                                                    </tr>
                                                                </thead>
                                                                <tbody class="text-center">
                                                                    <tr>
                                                                        <td>
                                                                            {{ number_format($user->EXP) }}
                                                                        </td>
                                                                        <td>
                                                                            {{ number_format($user->GAME_POINT) }}
                                                                        </td>
                                                                        <td>
                                                                            {{ number_format($user->totalCash) }}
                                                                        </td>
                                                                        <td>
                                                                            @if (date("Y", strtotime($user->LAST_PLAY_DATE)) == 3000)
                                                                                Did not join game
                                                                            @else
                                                                                {{ Helper::date_DiffReadable($user->LAST_PLAY_DATE) }}
                                                                            @endif
                                                                        </td>
                                                                        <td>
                                                                            {{ ucfirst(\Carbon\Carbon::parse($user->REG_DATE)->locale(env("WEB_LANGUAGE"))->isoFormat("MMMM, YYYY")) }}
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>
                                                    <div role="tabpanel" class="tab-pane fade" id="tab-kills">
                                                        <div class="table-responsive mt-10">
                                                            <table class="table table-bordered m-0">
                                                                <thead class="thead-default">
                                                                <tr>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Kills") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Deaths") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.KD") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Headshot") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Rifle") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Sniper") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.SMG") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Shotgun") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.MG") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Pistol") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Knife") }}</th>
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                <tr>
                                                                    <td class="nk-product-cart-title text-center">
                                                                        {{ $user->ENEMY_KILL_CNT }}
                                                                    </td>
                                                                    <td class="nk-product-cart-title text-center">
                                                                        {{ $user->DEATH_CNT }}
                                                                    </td>
                                                                    <td class="nk-product-cart-title text-center">
                                                                        {{ \Helper::math_DivisionByZero($user->ENEMY_KILL_CNT, $user->DEATH_CNT, true) }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->HEADSHOT_KILL_CNT }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->RIFLE_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->SHOT_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->SMG_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->SHOTGUN_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->HEAVY_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->PISTOL_KILL }}
                                                                    </td>
                                                                    <td class="nk-product-cart-total text-center">
                                                                        {{ $user->KNIFE_KILL }}
                                                                    </td>
                                                                </tr>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>
                                                    <div role="tabpanel" class="tab-pane fade" id="tab-matches">
                                                        <div class="table-responsive mt-10">
                                                            <table class="table table-bordered m-0">
                                                                <thead class="thead-default">
                                                                <tr>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Wins") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Loses") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.WinLoseRatio") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Draws") }}</th>
                                                                    <th class="text-center" style="width: 50px;">{{ __("user.Leave") }}</th>
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                <tr>
                                                                    <td class="text-center">
                                                                        {{ $user->WIN_CNT }}
                                                                    </td>
                                                                    <td class="text-center">
                                                                        {{ $user->LOSE_CNT }}
                                                                    </td>
                                                                    <td class="text-center">
                                                                        {{ \Helper::math_DivisionByZero($user->WIN_CNT, $user->LOSE_CNT, true) }}
                                                                    </td>
                                                                    <td class="text-center">
                                                                        {{ $user->DRAW_CNT }}
                                                                    </td>
                                                                    <td class="text-center">
                                                                        {{ $user->ESCAPE_CNT }}
                                                                    </td>
                                                                </tr>
                                                                </tbody>
                                                            </table>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div>
                                    <div class="d-flex justify-content-center">
                                        <div class="row no-gutters justify-content-end">
                                            <div class="profile-header-badges">
                                                <img src="/assets/images/badge/ASSAULT/{{ $user->RUSH_LEV ?? 0 }}.PNG" class="img-fluid" alt="Assalt Badge" />
                                                <img src="/assets/images/badge/SNIPER/{{ $user->SNIPER_LEV ?? 0 }}.PNG" class="img-fluid" alt="Sniper Badge" />
                                                <img src="/assets/images/badge/SCOUT/{{ $user->SCOUTING_LEV ?? 0 }}.PNG" class="img-fluid" alt="Scout Badge" />
                                                <img src="/assets/images/badge/KNIFE/{{ $user->SPECIAL_LEV ?? 0 }}.PNG" class="img-fluid" alt="Special Badge" />
                                                <img src="/assets/images/badge/ELITE/{{ $user->ELITE_LEV ?? 0 }}.PNG" class="img-fluid" alt="Elite Badge" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="d-flex justify-content-center mt-10">
                                        <div class="d-flex justify-content-center profile-header-badge w-100">
                                            <div class="d-flex justify-content-center nk-image-box-2 nk-no-effect hover w-100">
                                                @if ($user->badge != false)
                                                    <img src="{{ $user->badge->info->URL }}" data-from="1.1" alt="" style="max-width: 180px; max-height: 180px;">
                                                    <div class="nk-image-box-overlay nk-image-box-bottom">
                                                        <div>
                                                            <span class="nk-image-box-title h5">{{ $user->badge->info->NAME }}</span>
                                                            <div class="marquee" data-duration="3500" data-duplicated="false">{{ $user->badge->info->DESCRIPTION ?? "Sem descrição" }}</div>
                                                        </div>
                                                    </div>
                                                @else
                                                    <img src="/assets/images/default-profile-badge.png" data-from="1.1" alt="" style="max-width: 180px; max-height: 180px;">
                                                    <div class="nk-image-box-overlay nk-image-box-bottom">
                                                        <div>
                                                            <span class="nk-image-box-title h5"></span>
                                                        </div>
                                                    </div>
                                                @endif
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="nk-gap-1"></div>
                <div class="nk-info-box nk-info-box-sm bg-main-1 rounded shadow">
                    <div class="nk-info-box-icon">
                        <i class="ion-information-circled"></i>
                    </div>
                    {{ __("user.ProfileUpdate") }} <strong>{{ __("common._dayTime.everyDay") }} {{ __("common.at") }} {{ __("common._dayTime.midNight") }}</strong>.
                </div>
                <div class="nk-social-container bg-dark-2 block-border block-shadow rounded p-20">
                    <div class="nk-tabs">
                        <ul class="nav nav-tabs" role="tablist">
                            <li class="nav-item">
                                <a class="nav-link active" href="#tab-player" role="tab" data-toggle="tab">
                                    {{ __("user.PlayerMatchStatistics") }}
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#tab-ranked" role="tab" data-toggle="tab">
                                    {{ __("user.Ranked") }}
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#tab-inv" role="tab" data-toggle="tab">
                                    {{ __("user.Inventory") }}
                                </a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#tab-ribbons" role="tab" data-toggle="tab">
                                    {{ __("user.Ribbons") }}
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div role="tabpanel" class="tab-pane fade show active" id="tab-player">
                                <div class="nk-gap-1"></div>
                                <div class="nk-box">
                                    <div class="clearfix">
                                        <div class="float-left">
                                            <h5>{{ __("user.Last5Play") }}</h5>
                                        </div>
                                        <div class="float-right">
                                            <span class="text-muted">
                                                <i class="ion-help"></i>
                                                {{ __("user.MouseHover") }}
                                            </span>
                                        </div>
                                    </div>
                                    <div class="table-responsive">
                                        <table class="table table-bordered">
                                            <thead class="thead-default">
                                                <tr>
                                                    <th class="text-center" style="width: 50px;">#</th>
                                                    <th></th>
                                                    <th>{{ __("user.Mode") }}</th>
                                                    <th>{{ __("user.Map") }}</th>
                                                    <th style="width: 50px;">{{ __("user.Kills") }}</th>
                                                    <th style="width: 50px;">{{ __("user.Deaths") }}</th>
                                                    <th style="width: 50px;">{{ __("user.Assists") }}</th>
                                                    <th class="text-center" style="width: 85px;">{{ __("user.KD") }}</th>
                                                    <th></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            @forelse ($user->plays as $play)
                                                @if (is_null($play->match))
                                                    @continue
                                                @endif
                                                <tr>
                                                    <td class="text-center">
                                                        {{ $play->TX_SRL }}
                                                    </td>
                                                    <td class="text-warning" style="width: 10px;">
                                                        @if ($play->match->mode)
                                                            @if ($play->match->mode->TYPE == 0)
                                                                <span class="icon" data-tippy="{{ __("user.Normal") }}" data-tippy-arrow="true"><span class="ion-person"></span></span>
                                                            @elseif ($play->match->mode->TYPE == 1)
                                                                <span class="icon" data-tippy="{{ __("user.Clan") }}" data-tippy-arrow="true"><span class="ion-people"></span></span>
                                                            @elseif ($play->match->mode->TYPE == 2)
                                                                <span class="icon" data-tippy="{{ __("user.Ranked") }}" data-tippy-arrow="true"><span class="ion-trophy"></span></span>
                                                            @endif
                                                        @endif
                                                    </td>
                                                    <td>
                                                        <span class="nk-btn-color-main-1" dir="ltr">
                                                            @if ($play->match->mode)
                                                                {{ $play->match->mode->NAME }}
                                                            @else
                                                                {{ __("user.Unknown") }}
                                                            @endif
                                                        </span>
                                                    </td>
                                                    <td  dir="ltr">
                                                        @if ($play->match->map)
                                                            {{ $play->match->map->MAP_NAME }}
                                                        @else
                                                                {{ __("user.Unknown") }}
                                                        @endif
                                                    </td>
                                                    <td class="text-center">
                                                        {{ $play->KILL }}
                                                    </td>
                                                    <td class="text-center">
                                                        {{ $play->DEATH }}
                                                    </td>
                                                    <td class="text-center">
                                                        {{ $play->ASSIST }}
                                                    </td>
                                                    <td class="text-center">
                                                        @if ($play->DEATH > $play->KILL)
                                                            <span class="text-danger">{{ \Helper::math_DivisionByZero($play->KILL, $play->DEATH, true) }}</span>
                                                        @else
                                                            <span class="text-success">{{ \Helper::math_DivisionByZero($play->KILL, $play->DEATH, true) }}</span>
                                                        @endif
                                                    </td>
                                                    <td class="text-center" style="width: 20px;">
                                                        @if ($play->WIN == 1)
                                                            <span class="icon text-success" data-tippy="{{ __("user.Wins") }}" data-tippy-arrow="true"><span class="ion-checkmark"></span></span>
                                                        @elseif ($play->LOSE == 1)
                                                            <span class="icon text-danger" data-tippy="{{ __("user.Loses") }}" data-tippy-arrow="true"><span class="ion-close"></span></span>
                                                        @elseif ($play->LOSE == 0 && $play->WIN == 0)
                                                            <span class="icon text-warning" data-tippy="{{ __("user.NoWinner") }}" data-tippy-arrow="true"><span class="ion-help"></span></span>
                                                        @endif
                                                    </td>
                                                </tr>
                                            @empty
                                                <tr class="text-center">
                                                    <td colspan="9">{{ __("user.NoGames") }}</td>
                                                </tr>
                                            @endforelse
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="nk-box">
                                    <h5>{{ __("user.PunishmentHistory") }}</h5>
                                    <div class="table-responsive">
                                        <table class="table table-bordered">
                                            <thead class="thead-default">
                                                <tr>
                                                    <th class="text-center" style="width: 5%;">#</th>
                                                    <th>{{ __("user.PunishmentType") }}</th>
                                                    <th>{{ __("user.PunishmentMotive") }}</th>
                                                    <th>{{ __("user.PunishmentApplicant") }}</th>
                                                    <th>{{ __("user.PunishmentDate") }}</th>
                                                    <th>{{ __("user.PunishmentDuration") }}</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                @forelse ($user->bans as $ban)
                                                    <tr>
                                                        <td class="text-center">
                                                            {{ $ban->SRL }}
                                                        </td>
                                                        <td>
                                                            @if ($ban->TYPE == 0)
                                                                <span class="text-danger">{{ \Helper::game_getBanType($ban->TYPE) }}</span>
                                                            @else
                                                                <span class="text-warning">{{ \Helper::game_getBanType($ban->TYPE) }}</span>
                                                            @endif
                                                        </td>
                                                        <td>
                                                            {{ $ban->REASON }}
                                                        </td>
                                                        <td>
                                                            <a href="{{ route('profile', $ban->issuer->USN) }}">{{ $ban->issuer->NICK }}</a>
                                                        </td>
                                                        <td>
                                                            {{ \Helper::date_stringFormat($ban->START_DATE, true) }}
                                                        </td>
                                                        <td>
                                                            {{ date("Y", strtotime($ban->END_DATE)) == 3000 ?   __("user.NoGames") : \Helper::date_ForDate($ban->END_DATE, $ban->START_DATE) . " days" }}
                                                        </td>
                                                    </tr>
                                                @empty
                                                    <tr class="text-center">
                                                        <td colspan="6" class="text-success">{{ __("user.NoPunishment") }} <i class="fal fa-thumbs-up"></i></td>
                                                    </tr>
                                                @endforelse
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-ranked">
                                <div class="nk-gap-2"></div>
                                @if (isset($user->ranked) && $user->ranked != null && count($user->ranked) > 0)
                                <div class="nk-carousel-2 ranked" @if(count($user->ranked) > 1) data-arrows="true" data-dots="true" @endif>
                                    <div class="nk-carousel-inner">
                                        @foreach ($user->ranked as $ranked)
                                        <div>
                                            <div class="row">
                                                <div class="col-3">
                                                    <div class="text-center">
                                                        @if ($ranked->MEDAL > 0)
                                                            <h4 class="m-0">{{ Helper::game_getRankedTitle($ranked->MIN_SCORE) }}</h4>
                                                            <img src="/assets/images/ranks/ranked/{{ $ranked->GRADE }}_{{ $ranked->MIN_SCORE }}.png" class="img-fluid" alt="rank">
                                                        @else
                                                            <img src="/assets/images/ranks/ranked/NO.png" class="img-fluid" alt="rank">
                                                        @endif
                                                    </div>
                                                </div>
                                                <div class="col-9">
                                                    <div class="row mb-10">
                                                        <div class="col-12">
                                                            <h4 class="text-center">{{ Helper::game_getRankedMode($ranked->RANK_MODE_INDEX) }}</h4>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->RANK_SCORE ?? 0 }}</strong> Score
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->MATCH_COUNT }}</strong> Match(es)
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row mt-10">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->KILL }}</strong> Kill
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->DEATH }}</strong> Death
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row mt-10">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->WIN }}</strong> Wins
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->LOSE }}</strong> Lose
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        @endforeach
                                    </div>
                                </div>
                                @else
                                    <p class="text-center">Player has no ranked information.</p>
                                @endif
                            </div>
                                {{--@if (isset($user->ranked) && $user->ranked != null && count($user->ranked) > 0)
                                <div class="nk-carousel-2 ranked" @if(count($user->ranked) > 1) data-arrows="true" data-dots="true" @endif>
                                    <div class="nk-carousel-inner">
                                        @foreach ($user->ranked as $ranked)
                                        <div>
                                            <div class="row">
                                                <div class="col-3">
                                                    <div class="text-center">
                                                        @if ($ranked->MEDAL > 0)
                                                            <h4 class="m-0">{{ Helper::game_getRankedTitle($ranked->MIN_SCORE) }}</h4>
                                                            <img src="/assets/images/ranks/ranked/{{ $ranked->GRADE }}_{{ $ranked->MIN_SCORE }}.png" class="img-fluid" alt="rank">
                                                        @else
                                                            <img src="/assets/images/ranks/ranked/NO.png" class="img-fluid" alt="rank">
                                                        @endif
                                                    </div>
                                                </div>
                                                <div class="col-9">
                                                    <div class="row mb-10">
                                                        <div class="col-12">
                                                            <h4 class="text-center">{{ Helper::game_getRankedMode($ranked->RANK_MODE_INDEX) }}</h4>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->RANK_SCORE ?? 0 }}</strong> {{ __("user.RankedScore") }}
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->MATCH_COUNT }}</strong> {{ __("user.Matches") }}
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row mt-10">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->KILL }}</strong> {{ __("user.Kills") }}
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->DEATH }}</strong> {{ __("user.Deaths") }}
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row mt-10">
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->WIN }}</strong> {{ __("user.Wins") }}
                                                            </div>
                                                        </div>
                                                        <div class="col-6">
                                                            <div class="block-border block-shadow p-20">
                                                                <strong>{{ $ranked->LOSE }}</strong> {{ __("user.Loses") }}
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        @endforeach
                                    </div>
                                </div>
                                @else
                                    <p class="text-center">{{ __("user.NoRankedPlay") }}</p>
                                @endif--}}
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-inv">
                                <div class="nk-carousel-2" data-dots="false" @if(count($user->user_inventory) > 10) data-arrows="true" @else data-arrows="false" @endif>
                                    <div class="nk-carousel-inner">
                                        <div>
                                            <div class="row no-gutters">
                                                @php $cnt = 1; foreach ($user->user_inventory as $inv): @endphp
                                                <div class="col-3">
                                                    <div class="profile-inv-item">
                                                        <div class="row">
                                                            <div class="col-12 text-center">
                                                                <a href="{{ asset("assets/images/weapons/$inv->ITEM_CODE.png") }}" data-fancybox="{{ $inv->ITEM_CODE }}" data-type="image" data-caption="{{ $inv->SHORT_NAME }}">
                                                                @if ($inv->USE_TYPE1 == "P")
                                                                    <img src="{{ asset("assets/images/weapons/$inv->ITEM_CODE.png") }}" width="256" height="128" alt="Item" style="background-image: url('/assets/images/CF_ITEM_TIMER.jpg');" />
                                                                @else
                                                                    <img src="{{ asset("assets/images/weapons/$inv->ITEM_CODE.png") }}" width="256" height="128" alt="Item" style="background-image: url('{{ $inv->VVIP_INDEX == 1 ? asset("assets/images/CF_ITEM_VIP.jpg") : asset("assets/images/CF_ITEM.jpg") }}');" />
                                                                @endif
                                                                </a>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-12">
                                                                <div class="profile-inv-item-name d-flex justify-content-center" style="background-image: url('{{ $inv->VVIP_INDEX == 1 ? asset("assets/images/CF_ITEM_VIP_1.jpg") : asset("assets/images/CF_ITEM_1.jpg") }}');">
                                                                    <div class="text-truncate" style="max-width: 195px;" @if (strlen($inv->SHORT_NAME) >= 26) data-tippy="{{ $inv->SHORT_NAME }}" data-tippy-arrow="true" @endif>
                                                                        <strong class="nk-btn-color-main-1">{{ $inv->SHORT_NAME }}</strong>&nbsp;
                                                                    </div>
                                                                    [{{ $inv->COUNTER }}]
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                @php if ($cnt % 12 == 0): echo "</div></div><div><div class=\"row no-gutters\">"; endif; $cnt++; endforeach; @endphp
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tab-ribbons">
                                <div class="row no-gutters mt-10">
                                    <div class="col-12 text-center">
                                        Ribbons will be back soon!
                                    </div>
                                    {{--@php $ribbonArr = array(); @endphp
                                    @foreach ($user->ribbonsAll as $ribbon)
                                        @foreach ($user->ribbons as $userRibbon)
                                            @if ($ribbon->SRL == $userRibbon->RIBBON_SRL)
                                                @php array_push($ribbonArr, $ribbon->SRL) @endphp
                                                <div class="m-1">
                                                    <div class="row">
                                                        <div class="col-12 text-center">
                                                            <img src="/assets/images/ribbons/{{ $ribbon->SRL . ".jpg" }}" style="border: 1px solid rgba(255, 255, 255, 0.1);" data-tippy="<strong class=text-warning>{{ $ribbon->NAME }}</strong><br>{{ $ribbon->DESCRIPTION }}@if(!is_null($ribbon->reward)) <br><strong class=text-success>Recompensa:</strong> {{ $ribbon->reward->SHORT_NAME }}@endif" data-tippy-arrow="true" width="145" height="39" alt="Ribbon" />
                                                        </div>
                                                    </div>
                                                </div>
                                            @endif
                                        @endforeach
                                        @if (!in_array($ribbon->SRL, $ribbonArr))
                                            <div class="m-1">
                                                <div class="row">
                                                    <div class="col-12 text-center">
                                                        <img src="/assets/images/ribbons/off/{{ $ribbon->SRL . "_off.jpg" }}" style="border: 1px solid rgba(255, 255, 255, 0.1);" data-tippy="<strong class=text-warning>{{ $ribbon->NAME }}</strong><br>{{ $ribbon->DESCRIPTION }}@if(!is_null($ribbon->reward)) <br><strong class=text-success>Recompensa:</strong> {{ $ribbon->reward->SHORT_NAME }}@endif" data-tippy-arrow="true" width="145" height="39" alt="Ribbon" />
                                                    </div>
                                                </div>
                                            </div>
                                        @endif
                                    @endforeach--}}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="nk-gap-2"></div>
            </div>
        </div>
    </div>
@endsection