@model WebVentaCoche.ViewModels.AccountDetailsViewModel

@{
    ViewData["Title"] = "Detalles de Cuenta";
}

<div class="container">
    <h2 class="text-center my-4">Detalles del Usuario</h2>

    <div class="row justify-content-center mb-4">
        <div class="col-md-8">
            <div class="card p-3" style="background-color: rgba(255,255,255,0.8); border-radius:10px;">
                <h5>@Model.Name @Model.Surname</h5>
                <dl class="row">
                    <dt class="col-sm-4">Email</dt>
                    <dd class="col-sm-8">@Model.Email</dd>
                    <dt class="col-sm-4">Teléfono</dt>
                    <dd class="col-sm-8">@Model.PhoneNumber</dd>
                    <dt class="col-sm-4">Tipo</dt>
                    <dd class="col-sm-8">@Model.UserType</dd>
                </dl>
            </div>
        </div>
    </div>

    <h3 class="text-center mb-3">Direcciones</h3>
    @if (Model.Addresses.Any())
    {
        <div class="row justify-content-center">
            <div class="col-md-8">
                @foreach (var addr in Model.Addresses)
                {
                    <div class="card mb-3 p-3" style="background: rgba(255,255,255,0.8); border-radius:10px;">
                        <p>
                            <strong>@addr.Street</strong><br />
                            @addr.City, @addr.State @addr.ZipCode<br />
                            @addr.Country
                        </p>
                    </div>
                }
            </div>
        </div>
    }
    else
    {
        <p class="text-center">No has agregado ninguna dirección todavía.</p>
    }
</div>
