@model List<DayScheduleViewModel>

<div class="container mt-4 mb-4 text-center">
    <div class="row justify-content-center">
        <div class="col-lg-4">
            <h2>Schedule</h2>

            @if (Model.Count == 0)
            {
                <p>No schedule found.</p>
            }
            else
            {
                @foreach (var day in Model)
                {
                    <h3>@day.Day.ToString("dddd, dd MMMM yyyy")</h3>
                    <ul class="list-group list-group-flush">
                        @foreach (var timeSlot in day.TimeSlots.OrderBy(ts => ts.StartTime))
                        {
                            if (timeSlot.IsAvailable)
                            {
                                var endTimeLocal = @timeSlot.StartTime.AddHours(1);
                                <li class="list-group-item">@timeSlot.StartTime.ToString("hh:mm tt") - @endTimeLocal.ToString("hh:mm tt")</li>
                            }
                        }
                    </ul>
                }
            }
        </div>
    </div>
</div>
