<aside class="main-sidebar sidebar-dark-{{ config('kylin-adminlte.theme.sidebar', 'dark') }} elevation-4">
    <a href="{{ url(config('kylin-adminlte.dashboard_url')) }}" class="brand-link">
        @if(config('kylin-adminlte.logo_img'))
        <img src="{{ asset(config('kylin-adminlte.logo_img')) }}" alt="Logo" class="{{ config('kylin-adminlte.logo_img_class') }}" style="opacity: .8">
        @endif
        <span class="brand-text font-weight-light">{!! config('kylin-adminlte.logo', '<b>Kylin</b> Admin') !!}</span>
    </a>

    <div class="sidebar">
        <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" aria-label="{{ __('主导航菜单') }}">
                @foreach(config('kylin-adminlte.menu', []) as $item)
                    {{-- 跳过无权限的菜单项 --}}
                    @if(isset($item['can']))
                        @can($item['can'])
                            @includeIf('kylin-adminlte::partials.sidebar-item', ['item' => $item])
                        @endcan
                        @continue
                    @endif

                    {{-- 跳过无权限角色的菜单项 --}}
                    @if(isset($item['role']))
                        @role($item['role'])
                            @includeIf('kylin-adminlte::partials.sidebar-item', ['item' => $item])
                        @endrole
                        @continue
                    @endif

                    @includeIf('kylin-adminlte::partials.sidebar-item', ['item' => $item])
                @endforeach
            </ul>
        </nav>
    </div>
</aside>