<!--
~ 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-content [innerHtml]="item.description"> </ion-card-content>
</ion-card>
@if (item.sameAs) {
  <ion-card>
    <ion-card-header> {{ 'sameAs' | propertyNameTranslate: item | titlecase }} </ion-card-header>
    <ion-card-content>
      <stapps-external-link [link]="item.sameAs" [text]="item.name"></stapps-external-link>
    </ion-card-content>
  </ion-card>
}
@if (item.employerOverview) {
  <ion-card>
    <ion-card-header> {{ 'jobs.employer' | translate }} </ion-card-header>
    <ion-card-content>
      @if (item.employerOverview.sameAs) {
        <stapps-external-link
          [link]="item.employerOverview.sameAs"
          [text]="item.employerOverview.name"
        ></stapps-external-link>
      }
      @if (!item.employerOverview.sameAs) {
        <p>{{ item.employerOverview.name }}</p>
      }
      @if (item.employerOverview.image) {
        <ion-img class="company-image" src="{{ item.employerOverview.image }}"></ion-img>
      }
      <p [innerHtml]="item.employerOverview.description"></p>
    </ion-card-content>
  </ion-card>
}
