<!--
~ 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/>.
-->

@if (item.type === 'academic event' && item.categories) {
  <stapps-simple-card
    [title]="'categories' | propertyNameTranslate: item | titlecase"
    [content]="'categories' | thingTranslate: item"
  >
  </stapps-simple-card>
}
@if (item.type === 'academic event') {
  <stapps-add-event-action-chip [item]="item"> </stapps-add-event-action-chip>
}
@if (item.performers) {
  <stapps-simple-card
    [title]="'performers' | propertyNameTranslate: item | titlecase"
    [content]="item.performers"
  ></stapps-simple-card>
}
@if (item.organizers) {
  <stapps-simple-card
    [title]="'organizers' | propertyNameTranslate: item | titlecase"
    [content]="item.organizers"
  ></stapps-simple-card>
}
@if (item.type === 'academic event') {
  @if (item.majors) {
    <stapps-simple-card
      [title]="'majors' | propertyNameTranslate: item"
      [content]="item.majors"
    ></stapps-simple-card>
  }
}
@if (item.catalogs) {
  <ion-card>
    <ion-card-header>{{ 'superCatalogs' | propertyNameTranslate: 'catalog' | titlecase }}</ion-card-header>
    <ion-card-content>
      @for (item of item.catalogs; track item) {
        <event-route-path
          [maxItems]="1"
          [itemsAfterCollapse]="1"
          [itemsBeforeCollapse]="0"
          [items]="[undefined, item]"
          [more]="item.uid | lazyThing: 'superCatalogs'"
        >
        </event-route-path>
      }
    </ion-card-content>
  </ion-card>
}
