<!--
~ 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-label class="title">{{ 'name' | thingTranslate: _item }}</ion-label>
@if (_item.type !== 'floor') {
  <p class="title-sub">
    <stapps-opening-hours [openingHours]="_item.openingHours"></stapps-opening-hours>
    @if (_item.type !== 'building' && _item.inPlace) {
      <ion-icon name="pin_drop"></ion-icon>
      <ion-label>{{ 'name' | thingTranslate: _item.inPlace }}</ion-label>
    }
  </p>
  <ion-note>
    @if (_item.categories && _item.type !== 'building') {
      <ion-label> {{ 'categories' | thingTranslate: _item | join: ', ' | titlecase }} </ion-label>
    } @else {
      <ion-label> {{ 'type' | thingTranslate: _item | titlecase }} </ion-label>
    }
    @if (distance | async; as distance) {
      <ion-label @fade>
        <ion-icon name="directions_walk"></ion-icon>
        {{ distance | metersLocalized }}
      </ion-label>
    }
  </ion-note>
}
@if (_item.description) {
  <p>{{ 'description' | thingTranslate: _item }}</p>
}
