@extends('layouts.app')

@section('content')
    <div class="modcp-wrapper">
        <aside class="modcp-sidebar">
            <div class="modcp-sidebar-header">
                <i data-lucide="shield" size="16"></i>
                Mod CP
            </div>

            <nav class="modcp-nav">

                <div class="modcp-nav-group">
                    <span class="modcp-nav-label">Overview</span>
                    <a href="{{ route('modcp.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.index') ? 'active' : '' }}>
                        <i data-lucide="layout-dashboard" size="15"></i>
                        Dashboard
                    </a>
                    <a href="{{ route('queue.index') }}" class="modcp-nav-item" {{ request()->routeIs('queue.index') ? 'active' : '' }}>
                        <i data-lucide="gavel" size="15"></i>
                        Submissions Queue
                        @if(( $pending = \App\Models\Entry::where('state','pending')->count() ) > 0)
                            <span class="modcp-nav-badge">{{ $pending }}</span>
                        @endif
                    </a>
                </div>

                <div class="modcp-nav-group">
                    <span class="modcp-nav-label">Content</span>
                    <a href="{{ route('modcp.locked') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.locked') ? 'active' : '' }}>
                        <i data-lucide="lock" size="15"></i>
                        Locked entries
                    </a>
                    @can('is-admin')
                        <a href="{{ route('modcp.draft') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.draft') ? 'active' : '' }}>
                            <i data-lucide="scissors" size="15"></i>
                            Draft entries
                        </a>
                        <a href="{{ route('modcp.hidden') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.hidden') ? 'active' : '' }}>
                            <i data-lucide="eye-off" size="15"></i>
                            Hidden entries
                        </a>
                        <a href="{{ route('modcp.deleted') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.deleted') ? 'active' : '' }}>
                            <i data-lucide="trash-2" size="15"></i>
                            Deleted entries
                        </a>
                        <a href="{{ route('modcp.logs') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.logs') ? 'active' : '' }}>
                            <i data-lucide="logs" size="15"></i>
                            Logs
                        </a>
                    @endcan
                </div>

                <div class="modcp-nav-group">
                    <span class="modcp-nav-label">Resources</span>
                    <a href="{{ route('modcp.games.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.games.*') ? 'active' : '' }}">
                        <i data-lucide="gamepad-2" size="15"></i>
                        Games
                    </a>
                    <a href="{{ route('modcp.languages.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.languages.*') ? 'active' : '' }}">
                        <i data-lucide="languages" size="15"></i>
                        Languages
                    </a>
                    <a href="{{ route('modcp.authors.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.authors.*') ? 'active' : '' }}">
                        <i data-lucide="users" size="15"></i>
                        Authors
                    </a>
                    @can('is-admin')
                        <a href="{{ route('modcp.platforms.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.platforms.*') ? 'active' : '' }}">
                            <i data-lucide="gamepad-directional" size="15"></i>
                            Platforms
                        </a>
                        <a href="{{ route('modcp.genres.index') }}" class="modcp-nav-item" {{ request()->routeIs('modcp.genres.*') ? 'active' : '' }}">
                            <i data-lucide="box" size="15"></i>
                            Genres
                        </a>
                    @endcan
                </div>

                <div class="modcp-nav-group">
                    <span class="modcp-nav-label">Community</span>
                    <a href="{{ xfRoute('reports') }}" class="modcp-nav-item">
                        <i data-lucide="triangle-alert" size="15"></i>
                        Reports
                    </a>
                    <a href="{{ xfRoute('approval-queue') }}" class="modcp-nav-item">
                        <i data-lucide="message-circle-check" size="15"></i>
                        Approval Queue
                    </a>
                </div>

            </nav>
        </aside>

        <div class="modcp-content">
            @yield('modcp-content')
        </div>
    </div>
@endsection
