@using System.Security.Claims
@inject IHttpContextAccessor HttpContextAccessor

@{
    Layout = "_Layout";

    var userId = HttpContextAccessor.HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier);
    string currentAction = ViewContext.RouteData.Values["action"]?.ToString() ?? "";
}

<div class="container-fluid mt-4">
    <div class="row">
        <nav class="col-md-3 col-lg-2 d-none d-md-block bg-light sidebar py-3">
            <div class="nav flex-column nav-pills">
                <a class="nav-link @(currentAction=="Settings" ? "active" : "")"
                   asp-controller="Account"
                   asp-action="Settings">
                    Cuenta
                </a>
                <a class="nav-link @(currentAction=="Addresses" ? "active" : "")"
                   asp-controller="Account"
                   asp-action="Addresses">
                    Direcciones
                </a>
                <a class="nav-link @(currentAction=="Security" ? "active" : "")"
                   asp-controller="Account"
                   asp-action="Security">
                    Seguridad
                </a>
            </div>
        </nav>

        <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
            @RenderBody()
        </main>
    </div>
</div>

@RenderSection("Scripts", required: false)
