@model turf_tasker.Models.DashboardViewModel
@{
    ViewData["Title"] = "Dashboard";
}

<div class="text-center">
    <h1 class="display-4">Lawn Care Dashboard</h1>
    <p>Your lawn's status at a glance.</p>
</div>

<div class="row mt-4 text-center">

    <!-- Last Mowed Card -->
    <div class="col-md-3">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title">Last Mowed</h5>
                <p class="card-text fs-4">
                    @if (Model.LastMowDate.HasValue)
                    {
                        @Model.LastMowDate.Value.ToString("D")
                    }
                    else
                    {
                        <span class="text-muted">Not yet logged</span>
                    }
                </p>
            </div>
            <div class="card-footer">
                Next Pattern: <strong>@Model.NextMowingPattern</strong>
            </div>
        </div>
    </div>

    <!-- Last Watered Card -->
    <div class="col-md-3">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title">Last Watered</h5>
                <p class="card-text fs-4">
                    @if (Model.LastWaterDate.HasValue)
                    {
                        @Model.LastWaterDate.Value.ToString("D")
                    }
                    else
                    {
                        <span class="text-muted">Not yet logged</span>
                    }
                </p>
            </div>
        </div>
    </div>

    <!-- Last Fertilized Card -->
    <div class="col-md-3">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title">Last Fertilized</h5>
                <p class="card-text fs-4">
                    @if (Model.LastFertilizeDate.HasValue)
                    {
                        @Model.LastFertilizeDate.Value.ToString("D")
                    }
                    else
                    {
                        <span class="text-muted">Not yet logged</span>
                    }
                </p>
            </div>
        </div>
    </div>
    
    <!-- Last aeration card -->
    <div class="col-md-3">
        <div class="card h-100">
            <div class="card-body">
                <h5 class="card-title">Last Aeration</h5>
                <p class="card-text fs-4">
                    @if (Model.LastAerationDate.HasValue)
                    {
                        @Model.LastAerationDate.Value.ToString("D")
                    }
                    else
                    {
                        <span class="text-muted">Not yet logged</span>
                    }
                </p>
            </div>
        </div>
    </div>
    
    <!-- Add New Event Card -->
    <div class="row mt-4 text-center">
        <div class="col-md-3">
            <div class="card h-100 bg-light">
                <div class="card-body d-flex flex-column justify-content-center">
                    <h5 class="card-title">Log a New Activity</h5>
                    <p class="card-text">Keep your dashboard up to date.</p>
                    <a asp-controller="LawnCareEvents" asp-action="Create" class="btn btn-primary mt-auto">
                        Add New Event
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>