@inherits LayoutComponentBase

<PageTitle>HeartTrack</PageTitle>

<div class="page">
    <div class="sidebar @NavMenuCssClass" @onclick="ToggleNavMenu">
        <NavMenu />
    </div>

    <main>
        <div class="top-row px-4 auth">
            <div class="container-fluid toggler-container">
                <button title="Navigation menu" class="navbar-toggler custom-toggler" @onclick="ToggleNavMenu">
                    <span class="navbat-toggler-icon"></span>
                </button>
            </div>
            @* Messages, notifs et pp compte à mettre *@
            <div class="px-4">
                <CultureSelector />
            </div>
        </div>

        <article class="content px-4">
            @Body
        </article>
    </main>
</div>

@code {
    private bool collapseNavMenu = true;

    private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}