@inherits LayoutComponentBase
@inject NavigationManager Navigation

@if (!HideGlobalMenu)
{
    <SiteMenu />
    <main class="site-layout-body">
        @Body
    </main>
}
else
{
    @Body
}

@code {
    private bool HideGlobalMenu
    {
        get
        {
            var currentPath = new Uri(Navigation.Uri).AbsolutePath.Trim('/');

            return string.Equals(currentPath, "chrono", StringComparison.OrdinalIgnoreCase)
                || string.Equals(currentPath, "chrono.html", StringComparison.OrdinalIgnoreCase)
                || string.Equals(currentPath, "cube", StringComparison.OrdinalIgnoreCase)
                || string.Equals(currentPath, "cube.html", StringComparison.OrdinalIgnoreCase)
                || string.Equals(currentPath, "application", StringComparison.OrdinalIgnoreCase)
                || string.Equals(currentPath, "application.html", StringComparison.OrdinalIgnoreCase);
        }
    }
}
