@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<div class="container">

    <div class="col-lg-7">
        <p class="lead mt-5">Welcome @Model.FirstName @Model.LastName!</p>
        <h1 class="mt-4">General Directorate of Region Taxes and Real Estate</h1>
    </div>

    <div class="col-lg-7 d-flex flex-column justify-content-center rounded py-3 px-4 shadow-sm"
        style="margin-top: 60px; margin-bottom: 60px;">
        <h3 class="font-weight-bold mt-3 text-custom">Your total tax is:</h3>
        <p class="font-weight-bold text-black" style="font-size: 50px">@Model.TotalTax.ToString("N0") IQD</p>
    </div>

    <div class="container mt-5">
        <h4 class="mt-5 mb-3 font-weight-bold">Taxable Properties</h4>
        <table class="table mt-3 rounded table-bordered">
            <thead class="bg-secondary text-white">
                <tr>
                    <th scope="col">Area</th>
                    <th scope="col">Adress</th>
                </tr>
            </thead>
            <tbody>

                @foreach (var realEstate in Model.RealEstate)
                {
                    <tr>
                        <td>@realEstate.Area</td>
                        <td>@realEstate.Address</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>

    <div class="container">
        <h4 class="mt-5 mb-3 font-weight-bold">Vehicles</h4>
        <table class="table mt-3 rounded table-bordered">
            <thead class="bg-secondary text-white">
                <tr>
                    <th scope="col">Model</th>
                    <th scope="col">License Plate</th>
                    <th scope="col">Color</th>
                    <th scope="col">Type</th>
                </tr>
            </thead>
            <tbody>

                @foreach (var vehicle in Model.Vehicles)
                {
                    <tr>
                        <td>@vehicle.Model</td>
                        <td>@vehicle.LicensePlate</td>
                        <td>@vehicle.Color</td>
                        <td>@vehicle.Type</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
