@using Moonlight.Shared.Layouts
@using Moonlight.App.Services
@using Moonlight.App.Models.Enums

@inject IdentityService IdentityService

<div class="app-sidebar flex-column @(Layout.ShowMobileSidebar ? "drawer drawer-start drawer-on" : "")">
    <div class="app-sidebar-header d-flex flex-stack d-none d-lg-flex pt-8 pb-2">
        <a href="/metronic8/demo38/../demo38/index.html" class="app-sidebar-logo">
            <img alt="Logo" src="/metronic8/demo38/assets/media/logos/demo38.svg" class="h-25px d-none d-sm-inline app-sidebar-logo-default theme-light-show">
            <img alt="Logo" src="/metronic8/demo38/assets/media/logos/demo38-dark.svg" class="h-20px h-lg-25px theme-dark-show">
        </a>
    </div>
    <div class="app-sidebar-navs flex-column-fluid py-6" id="kt_app_sidebar_navs">
        <div id="kt_app_sidebar_navs_wrappers" class="app-sidebar-wrapper hover-scroll-y my-2" style="height: 811px;">
            <div class="app-sidebar-menu-secondary menu menu-rounded menu-column mb-6">
                <div class="menu-item">
                    <a class="menu-link " href="/">
                        <span class="menu-icon">
                            <i class="bx bx-sm bxs-dashboard"></i>
                        </span>
                        <span class="menu-title">
                            Dashboard
                        </span>
                    </a>
                </div>
                <div class="menu-item">
                    <a class="menu-link " href="/store">
                        <span class="menu-icon">
                            <i class="bx bx-sm bx-store"></i>
                        </span>
                        <span class="menu-title">
                            Store
                        </span>
                    </a>
                </div>
                <div class="menu-item">
                    <a class="menu-link " href="/services">
                        <span class="menu-icon">
                            <i class="bx bx-sm bxs-component"></i>
                        </span>
                        <span class="menu-title">
                            Services
                        </span>
                    </a>
                </div>
                <div class="menu-item">
                    <a class="menu-link " href="/community">
                        <span class="menu-icon">
                            <i class="bx bx-sm bx-group"></i>
                        </span>
                        <span class="menu-title">
                            Community
                        </span>
                    </a>
                </div>
                @if (IdentityService.Permissions[Permission.AdminMenu])
                {
                    <div class="menu-item mt-5">
                        <div class="menu-heading text-uppercase fs-7 fw-bold">
                            Admin
                        </div>
                        <div class="app-sidebar-separator separator"></div>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link " href="/admin">
                            <span class="menu-icon">
                                <i class="bx bx-sm bxs-dashboard"></i>
                            </span>
                            <span class="menu-title">
                                Dashboard
                            </span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link " href="/admin/users">
                            <span class="menu-icon">
                                <i class="bx bx-sm bx-group"></i>
                            </span>
                            <span class="menu-title">
                                Users
                            </span>
                        </a>
                    </div>
                }
            </div>
        </div>
    </div>
</div>

@code
{
    [CascadingParameter]
    public DefaultLayout Layout { get; set; }
}