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

<stapps-dish-characteristics [item]="item"></stapps-dish-characteristics>
@if (item.offers) {
  <stapps-offers-detail [offers]="item.offers"></stapps-offers-detail>
}
@if (item.certifications) {
  <stapps-certifications-in-detail [certifications]="item.certifications"></stapps-certifications-in-detail>
}
<!-- unwanted by swffm
<ion-card *ngIf="item.nutrition">
  <ion-card-header>{{
    'data.types.dish.detail.AVG_NUTRITION_INFO' | translate
  }}</ion-card-header>
  <ion-card-content>
    <ion-grid>
      <ion-row *ngIf="item.nutrition.calories">
        <ion-col>{{ 'data.types.dish.detail.CALORIES' | translate }}:</ion-col>
        <ion-col width-20 text-right>
          {{ item.nutrition.calories | numberLocalized }} kcal
        </ion-col>
      </ion-row>
      <ion-row *ngIf="item.nutrition.fatContent">
        <ion-col>{{ 'data.types.dish.detail.FAT_TOTAL' | translate }}:</ion-col>
        <ion-col width-20 text-right>
          {{ item.nutrition.fatContent | numberLocalized }} g
          <span *ngIf="item.nutrition.saturatedFatContent"
            >({{ 'data.types.dish.detail.FAT_SATURATED' | translate }}:
            {{ item.nutrition.saturatedFatContent | numberLocalized }} g)</span
            >
          </ion-col>
        </ion-row>
        <ion-row *ngIf="item.nutrition.carbohydrateContent">
          <ion-col
            >{{ 'data.types.dish.detail.CARBOHYDRATE' | translate }}:</ion-col
            >
            <ion-col width-20 text-right>
              {{ item.nutrition.carbohydrateContent | numberLocalized }} g
              <span *ngIf="item.nutrition.sugarContent"
                >({{ 'data.types.dish.detail.SUGAR' | translate }}:
                {{ item.nutrition.sugarContent | numberLocalized }} g)</span
                >
              </ion-col>
            </ion-row>
            <ion-row *ngIf="item.nutrition.saltContent">
              <ion-col>{{ 'data.types.dish.detail.SALT' | translate }}:</ion-col>
              <ion-col width-20 text-right>
                {{ item.nutrition.saltContent | numberLocalized }} g
              </ion-col>
            </ion-row>
            <ion-row *ngIf="item.nutrition.proteinContent">
              <ion-col>{{ 'data.types.dish.detail.PROTEIN' | translate }}:</ion-col>
              <ion-col width-20 text-right>
                {{ item.nutrition.proteinContent | numberLocalized }} g
              </ion-col>
            </ion-row>
          </ion-grid>
        </ion-card-content>
      </ion-card>
      -->
@if (item.additives) {
  <stapps-simple-card
    [title]="$any('additives' | propertyNameTranslate: item) | titlecase"
    [content]="'additives' | thingTranslate: item | join: ', '"
  >
  </stapps-simple-card>
}

<stapps-rating [item]="item"></stapps-rating>
