<!--
  ~ Copyright (C) 2021 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-card
  [style.height.px]="height * scale"
  [style.marginTop.px]="(fromY - fromHour) * scale - 5"
  [routerLink]="['/data-detail', scheduleEvent.dateSeries.event.uid]"
>
  <ion-card-header mode="md">
    <ion-card-title>
      {{
        this.scheduleEvent.dateSeries.event.name
          | nullishCoalesce: this.scheduleEvent.dateSeries.name
      }}
    </ion-card-title>
    <ion-card-subtitle>
      <ion-icon name="calendar"></ion-icon>
      <span
        class="repetitions"
        *ngIf="scheduleEvent.dateSeries.repeatFrequency"
      >
        {{ 'schedule.card.forEach' | translate }}
        {{
          scheduleEvent.dateSeries.repeatFrequency
            | durationLocalized: true
            | sentencecase
        }}
        {{ 'schedule.card.until' | translate }}
        {{
          scheduleEvent.dateSeries.dates | last | amDateFormat: 'DD. MMM YYYY'
        }}
      </span>
    </ion-card-subtitle>
  </ion-card-header>
  <ion-card-content>
    <ion-note>
      {{ getNote() }}
    </ion-note>
  </ion-card-content>
  <div></div>
</ion-card>
