<!--
  ~ 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/>.
  -->
<ion-card>
  <ion-card-header>
    <ion-card-title>
      <h1>
        <ng-container *ngIf="$any(item).honorificPrefix">{{
          'honorificPrefix' | thingTranslate : item
        }}</ng-container>
        {{ 'name' | thingTranslate : item }}
        <ng-container *ngIf="$any(item).honorificSuffix">{{
          'honorificSuffix' | thingTranslate : item
        }}</ng-container>
      </h1>
    </ion-card-title>
  </ion-card-header>
  <ion-card-content>
    <div *ngIf="$any(item).openingHours" class="openingHours">
      <stapps-opening-hours [openingHours]="item.openingHours"></stapps-opening-hours>
    </div>
    <div *ngIf="item.description" class="description">
      <div class="text-accordion" [style.-webkit-line-clamp]="descriptionLinesToDisplay" #accordionTextArea>
        {{ 'description' | thingTranslate : item }}
      </div>
    </div>
    <ion-button
      expand="full"
      fill="clear"
      *ngIf="item.description && buttonShown"
      (click)="toggleDescriptionAccordion()"
    >
      <ion-icon [name]="buttonState" size="large"></ion-icon>
    </ion-button>
  </ion-card-content>
</ion-card>
