<div class="sidebar">
    <div class="side-head">
        <a href="{{ route('admin.dashboard') }}" class="primary-color side-logo">
            <h3>{{ App_Name() }}</h3>
        </a>
        <button class="btn side-toggle">
            <span></span>
            <span></span>
            <span></span>
        </button>
    </div>

    <ul class="side-menu mt-4">
        <li class="side_line {{ request()->routeIs('admin.dashboard*') ? 'active' : '' }}{{ request()->routeIs('admin.profile*') ? 'active' : '' }}">
            <a href="{{ route('admin.dashboard') }}">
                <i class="fa-solid fa-house fa-2xl menu-icon"></i>
                <span>{{__('label.dashboard')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.basic_element')}}</span></p>
        <li class="dropdown {{ request()->routeIs('admin.category*') ? 'active' : '' }}{{ request()->routeIs('admin.level*') ? 'active' : '' }}{{ request()->routeIs('admin.skill*') ? 'active' : '' }}{{ request()->routeIs('admin.classification*') ? 'active' : '' }}{{ request()->routeIs('admin.avatar*') ? 'active' : '' }}">
            <a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fa-solid fa-sliders fa-2xl menu-icon"></i>
                <span>{{__('label.basic_items')}}</span>
            </a>
            <ul class="dropdown-menu side-submenu {{ request()->routeIs('admin.category*') ? 'show' : '' }}{{ request()->routeIs('admin.level*') ? 'show' : '' }}{{ request()->routeIs('admin.skill*') ? 'show' : '' }}{{ request()->routeIs('admin.classification*') ? 'show' : '' }}{{ request()->routeIs('admin.avatar*') ? 'show' : '' }}">
                <li class="side_line {{ request()->routeIs('admin.category*') ? 'active' : '' }}">
                    <a href="{{ route('admin.category.index') }}" class="dropdown-item">
                        <i class="fa-solid fa-shapes fa-2xl submenu-icon"></i>
                        <span>{{__('label.category')}}</span>
                    </a>
                </li>
                <li class="side_line {{ request()->routeIs('admin.skill*') ? 'active' : '' }}">
                    <a href="{{ route('admin.skill.index') }}" class="dropdown-item">
                        <i class="fa-solid fa-lightbulb fa-2xl submenu-icon"></i>
                        <span>{{__('label.skill')}}</span>
                    </a>
                </li>
                <li class="side_line {{ request()->routeIs('admin.classification*') ? 'active' : '' }}">
                    <a href="{{ route('admin.classification.index') }}" class="dropdown-item">
                        <i class="fa-solid fa-table-cells-large fa-2xl submenu-icon"></i>
                        <span>{{__('label.classification')}}</span>
                    </a>
                </li>
                <li class="side_line {{ request()->routeIs('admin.level*') ? 'active' : '' }}">
                    <a href="{{ route('admin.level.index') }}" class="dropdown-item">
                        <i class="fa-solid fa-layer-group fa-2xl submenu-icon"></i>
                        <span>{{__('label.level')}}</span>
                    </a>
                </li>
                <li class="side_line {{ request()->routeIs('admin.avatar*') ? 'active' : '' }}">
                    <a href="{{ route('admin.avatar.index') }}" class="dropdown-item">
                        <i class="fa-regular fa-face-smile fa-2xl submenu-icon"></i>
                        <span>{{__('label.avatar')}}</span>
                    </a>
                </li>
            </ul>
        </li>
        <li class="side_line {{ request()->routeIs('admin.user*') ? 'active' : '' }}">
            <a href="{{ route('admin.user.index') }}">
                <i class="fa-solid fa-users fa-2xl menu-icon"></i>
                <span>{{__('label.users')}}</span>
            </a>
        </li>

        <?php $config = Quiz_Configuration(); ?>

        <!-- Pratice -->
        @if(isset($config[0]) && $config[0]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.pratice_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.praticequestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.praticequestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.praticeleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.praticeleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Normal -->
        @if(isset($config[1]) && $config[1]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.normal_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.normalquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.normalquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.normalleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.normalleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Audio -->
        @if(isset($config[2]) && $config[2]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.audio_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.audioquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.audioquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.audioleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.audioleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Video -->
        @if(isset($config[3]) && $config[3]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.video_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.videoquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.videoquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.videoleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.videoleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- True-False -->
        @if(isset($config[4]) && $config[4]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.true_false_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.truefalsequestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.truefalsequestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.truefalseleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.truefalseleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Daily -->
        @if(isset($config[8]) && $config[8]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.daily_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.dailyquizquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.dailyquizquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.dailyquizleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.dailyquizleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Fear Factor -->
        @if(isset($config[5]) && $config[5]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.fear_factor_quiz')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.fearfactorquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.fearfactorquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            <li class="side_line {{ request()->routeIs('admin.fearfactorleaderboard*') ? 'active' : '' }}">
                <a href="{{ route('admin.fearfactorleaderboard.index') }}">
                    <i class="fa-solid fa-ranking-star fa-2xl menu-icon"></i>
                    <span>{{__('label.leaderboard')}}</span>
                </a>
            </li>
        @endif

        <!-- Ultimate Challenge -->
        @if(isset($config[6]) && $config[6]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.ultimate_challenges')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.ultimatechallenge*') ? 'active' : '' }}">
                <a href="{{ route('admin.ultimatechallenge.index') }}">
                    <i class="fa-solid fa-bullseye fa-2xl menu-icon"></i>
                    <span>{{__('label.ultimate_challenges')}}</span>
                </a>
            </li>
        @endif

        <!-- Contests -->
        @if(isset($config[7]) && $config[7]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.contests')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.contests*') ? 'active' : '' }}">
                <a href="{{ route('admin.contests.index') }}">
                    <i class="fa-solid fa-award fa-2xl menu-icon"></i>
                    <span>{{__('label.contests')}}</span>
                </a>
            </li>
        @endif

        <!-- Exam -->
        @if(isset($config[11]) && $config[11]['quiz_status'] == 1)
            <p class="partition"><span>{{__('label.exams')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.exam*') ? 'active' : '' }}">
                <a href="{{ route('admin.exam.index') }}">
                    <i class="fa-solid fa-file-alt fa-2xl menu-icon"></i>
                    <span>{{__('label.exams')}}</span>
                </a>
            </li>
        @endif

        <!-- Battles -->
        @if(isset($config[9]) && isset($config[10]) && ($config[9]['quiz_status'] == 1 || $config[10]['quiz_status'] == 1))
            <p class="partition"><span>{{__('label.battles')}}</span></p>
            <li class="side_line {{ request()->routeIs('admin.battlesquestion*') ? 'active' : '' }}">
                <a href="{{ route('admin.battlesquestion.index') }}">
                    <i class="fa-solid fa-circle-question fa-2xl menu-icon"></i>
                    <span>{{__('label.questions')}}</span>
                </a>
            </li>
            @if($config[9]['quiz_status'] == 1)
                <li class="side_line {{ request()->routeIs('admin.one_vs_one_battles*') ? 'active' : '' }}">
                    <a href="{{ route('admin.one_vs_one_battles.index') }}">
                        <i class="fa-solid fa-user-friends fa-2xl menu-icon"></i>
                        <span>{{__('label.1_vs_1_battles')}}</span>
                    </a>
                </li>
            @endif
            @if($config[10]['quiz_status'] == 1)
                <li class="side_line {{ request()->routeIs('admin.group_battles*') ? 'active' : '' }}">
                    <a href="{{ route('admin.group_battles.index') }}">
                        <i class="fa-solid fa-users fa-2xl menu-icon"></i>
                        <span>{{__('label.group_battles')}}</span>
                    </a>
                </li>
            @endif
        @endif

        <p class="partition"><span>{{__('label.interaction')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.notification*') ? 'active' : '' }}">
            <a href="{{ route('admin.notification.index') }}">
                <i class="fa-solid fa-bell fa-2xl menu-icon"></i>
                <span>{{__('label.notification')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.coin')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.package*') ? 'active' : '' }}">
            <a href="{{ route('admin.package.index') }}">
                <i class="fa-solid fa-box-archive fa-2xl menu-icon"></i>
                <span>{{__('label.packages')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.transaction*') ? 'active' : '' }}">
            <a href="{{ route('admin.transaction.index') }}">
                <i class="fa-solid fa-wallet fa-2xl menu-icon"></i>
                <span>{{__('label.transactions')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.products')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.product.*') ? 'active' : '' }}">
            <a href="{{ route('admin.product.index') }}">
                <i class="fa-solid fa-store fa-2xl menu-icon"></i>
                <span>{{__('label.products')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.producttransaction*') ? 'active' : '' }}">
            <a href="{{ route('admin.producttransaction.index') }}">
                <i class="fa-solid fa-wallet fa-2xl menu-icon"></i>
                <span>{{__('label.transactions')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.withdrawal')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.withdrawal*') ? 'active' : '' }}">
            <a href="{{ route('admin.withdrawal.index') }}">
                <i class="fa-solid fa-right-left fa-2xl menu-icon"></i>
                <span>{{__('label.withdrawal')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.ads')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.admob*') ? 'active' : '' }}">
            <a href="{{ route('admin.admob.index') }}">
                <i class="fa-brands fa-square-google-plus fa-2xl menu-icon"></i>
                <span>{{__('label.admob')}}</span>
            </a>
        </li>
        <!-- <li class="side_line {{ request()->routeIs('admin.fbads*') ? 'active' : '' }}">
            <a href="{{ route('admin.fbads.index') }}">
                <i class="fa-brands fa-square-facebook fa-2xl menu-icon"></i>
                <span>{{__('label.facebook_ads')}}</span>
            </a>
        </li> -->

        <p class="partition"><span>{{__('label.settings')}}</span></p>
        <li class="side_line {{ request()->routeIs('admin.appsetting*') ? 'active' : '' }}">
            <a href="{{ route('admin.appsetting.index') }}">
                <i class="fa-solid fa-gear fa-2xl menu-icon"></i>
                <span>{{__('label.app_settings')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.page*') ? 'active' : '' }}">
            <a href="{{ route('admin.page.index') }}">
                <i class="fa-solid fa-book-open-reader fa-2xl menu-icon"></i>
                <span>{{__('label.pages')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.payment*') ? 'active' : '' }}">
            <a href="{{ route('admin.payment.index') }}">
                <i class="fa-solid fa-money-bill-wave fa-2xl menu-icon"></i>
                <span>{{__('label.payment')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.panelsetting*') ? 'active' : '' }}">
            <a href="{{ route('admin.panelsetting.index') }}">
                <i class="fa-solid fa-palette fa-2xl menu-icon"></i>
                <span>{{__('label.panel_settings')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.coinsetting') ? 'active' : '' }}">
            <a href="{{ route('admin.coinsetting') }}">
                <i class="fa-solid fa-sack-dollar fa-2xl menu-icon"></i>
                <span>{{__('label.coin_settings')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.quizconfiguration*') ? 'active' : '' }}">
            <a href="{{ route('admin.quizconfiguration.index') }}">
                <i class="fa-solid fa-tools fa-2xl menu-icon"></i>
                <span>{{__('label.quiz_configuration')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.badge.setting') ? 'active' : '' }}">
            <a href="{{ route('admin.badge.setting') }}">
                <i class="fa-solid fa-award fa-2xl menu-icon"></i>
                <span>{{__('label.badge_settings')}}</span>
            </a>
        </li>
        <li class="side_line {{ request()->routeIs('admin.systemsetting*') ? 'active' : '' }}">
            <a href="{{ route('admin.systemsetting.index') }}">
                <i class="fa-solid fa-gears fa-2xl menu-icon"></i>
                <span>{{__('label.system_settings')}}</span>
            </a>
        </li>

        <p class="partition"><span>{{__('label.logout')}}</span></p>
        <li>
            <a href="{{ route('admin.logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                <i class="fa-solid fa-arrow-right-from-bracket fa-2xl menu-icon"></i>
                <span>{{__('label.logout')}}</span>
            </a>

            <form id="logout-form" action="{{ route('admin.logout') }}" method="GET" class="d-none">
                @csrf
            </form>
        </li>
    </ul>
</div>