<!--
~ Copyright (C) 2023 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/>.
-->

<!-- add +45 to margin--top to correct for date header height -->
<ion-card
  [style.height.px]="height * scale"
  [style.marginTop.px]="noOffset ? 0 : (fromY - fromHour) * scale - 5 + 45"
  [routerLink]="['/data-detail', scheduleEvent.dateSeries.uid]"
  [class.defaultCard]="cardColor.isDefault"
  [class.lectureCard]="cardColor.isLecture"
  [class.exerciseCard]="cardColor.isExercise"
  class="clickable"
>
  <ion-card-header mode="md">
    <ion-card-title>{{ scheduleEvent.dateSeries.event.name }}</ion-card-title>
  </ion-card-header>
  <ion-card-content>
    <ion-note>{{ scheduleEvent.dateSeries.name }}</ion-note>
    @if (showPlaceName) {
      <ion-text class="place-name">{{ scheduleEvent.dateSeries.inPlace?.name }}</ion-text>
    }
  </ion-card-content>
</ion-card>
