@{
    ViewData["Title"] = "LuminousCars";
}

<div class="text-center">
    @if (this.User.Identity.Name != null)
    {
        <h1 class="display-4">Welcome, @User.Identity.Name</h1>
        <br />
        @if (this.User.IsInRole("Admin"))
        {
            <a type="button" class="btn btn-primary" asp-area="" asp-controller="Cars" asp-action="Index">Manage cars</a>
            <a type="button" class="btn btn-primary" asp-area="" asp-controller="Rents" asp-action="Index">Manage rents</a>
            <a type="button" class="btn btn-primary" asp-area="" asp-controller="Users" asp-action="Index">Manage users</a>
        }
        else
        {
            <a type="button" class="btn btn-primary" asp-area="" asp-controller="Cars" asp-action="Index">See all cars</a>
            <a type="button" class="btn btn-primary" asp-area="" asp-controller="Rents" asp-action="Create">Rent a car</a>
        }
    }
    else
    {
        <h1>Welcome to LuminousCars</h1>
        <h2>Please register or login to access the system.</h2>
    }
</div>
