<!--
~ Copyright (C) 2022 StApps
~ This program is free software: you can redistribute it and/or modify it
~ under the terms of the GNU General Public License as published by the Free
~ Software Foundation, version 3.
~
~ This program is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
~ more details.
~
~ You should have received a copy of the GNU General Public License along with
~ this program. If not, see <https://www.gnu.org/licenses/>.
-->

<ion-content @materialFade>
  <ion-list lines="none">
    @for (day of events | async; track day) {
      <ion-item-group @materialFade>
        <ion-label class="day-label" color="medium"> {{ day[0].day | amDateFormat: 'LL' }} </ion-label>
        @for (event of day; track event) {
          <ion-item lines="none">
            <div class="hour-wrapper">
              <ion-text class="hour-label"> {{ event.event.time.startAsString }} </ion-text>
              <span class="hour-line"></span>
              <ion-text class="hour-label">{{ event.event.time.endAsString }}</ion-text>
            </div>
            <stapps-schedule-card
              class="event-card"
              [scheduleEvent]="event.event"
              [noOffset]="true"
              [scale]="scale"
              [showPlaceName]="true"
            >
            </stapps-schedule-card>
          </ion-item>
        }
      </ion-item-group>
    }
  </ion-list>
</ion-content>
