<!--
~ 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-section [title]="'dashboard.jobs.title' | translate">
  <ion-button slot="button-end" fill="clear" color="medium" [routerLink]="['/jobs']">
    <ion-icon slot="icon-only" name="search" [size]="24"></ion-icon>
  </ion-button>
  @if (jobs | async; as jobs) {
    <simple-swiper @fade>
      @for (item of jobs; track item) {
        <stapps-data-list-item
          [hideThumbnail]="true"
          [item]="item"
          appearance="square"
        ></stapps-data-list-item>
      }
      <ion-item [routerLink]="['/jobs']" class="more-jobs" lines="none">
        <ion-label>{{ 'dashboard.jobs.title' | translate | titlecase }}</ion-label>
        <ion-icon color="medium" name="read_more" [size]="40"></ion-icon>
      </ion-item>
    </simple-swiper>
  } @else {
    <ion-item class="nothing-selected" lines="none">
      <ion-label class="ion-text-wrap">
        {{ 'dashboard.jobs.noJobs' | translate }}
      </ion-label>
    </ion-item>
  }
</stapps-section>
