@props(['navItems' => [], 'featuredTournament' => null, 'shellPlayer' => null])

<aside class="arena-sidebar" id="arenaSidebar" role="navigation" aria-label="Primary navigation">
    <a href="{{ auth()->check() ? route('dashboard') : url('/') }}" class="sidebar-brand" aria-label="ALGA ESPORTS">
        <svg class="brand-logo" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
            <rect width="36" height="36" rx="8" fill="#7C5CFC" fill-opacity="0.2"/>
            <path d="M18 4L8 16H14L10 28H16L18 22L20 28H26L22 16H28L18 4Z" fill="#7C5CFC"/>
            <path d="M18 4L14 12H22L18 4Z" fill="#FFFFFF" fill-opacity="0.55"/>
        </svg>
        <div class="brand-text">
            <div class="brand-name">ALGA ESPORTS</div>
            <div class="brand-sub">Compete Hub</div>
        </div>
    </a>

    <nav class="sidebar-nav" aria-label="Main menu">
        @foreach($navItems as $item)
            <a
                class="sidebar-item {{ $item['is_active'] ? 'active' : '' }}"
                href="{{ $item['url'] }}"
                @if($item['is_active']) aria-current="page" @endif
            >
                <x-app.nav-icon :icon="$item['icon']" />
                <span>{{ $item['label'] }}</span>
                @if(!empty($item['badge']))
                    <span class="s-new">{{ $item['badge'] }}</span>
                @endif
            </a>
        @endforeach
    </nav>

    <x-app.sidebar-tournament :tournament="$featuredTournament" />
    <x-app.sidebar-user :player="$shellPlayer" />
</aside>
