<section class="deltagare-confirm">
  <h3 class="deltagare-confirm__header">Vad är det du vill rapportera?</h3>
  <p>{{ formGroup?.get('alternative').value === 'franvaro' ? 'Frånvaro' : 'Avvikelse'}}</p>

  <ng-container *ngIf="formGroup?.get('alternative').value === 'franvaro'">
    <h3 class="deltagare-confirm__header">Frånvaroorsak</h3>
    <ng-container *ngFor="let orsak of orsakskoderfranvaro">
      <p *ngIf="orsak.value == formGroup?.get('orsakerFormGroup').get('orsaker').value">{{orsak.name}}</p>
    </ng-container>

    <ng-container *ngIf="formGroup?.get('orsakerFormGroup').get('andraKandaOrsaker').value">
      <h3 class="deltagare-confirm__header">Annan känd orsak</h3>
      <ng-container *ngFor="let annanKandOrsak of andraKandaOrsaker">
        <p *ngIf="annanKandOrsak.value == formGroup?.get('orsakerFormGroup').get('andraKandaOrsaker').value">
          {{annanKandOrsak.name}}
        </p>
      </ng-container>
    </ng-container>

    <ng-container *ngIf="formGroup?.get('orsakerFormGroup').get('andraKandaOrsaker').value == 5">
      <h3 class="deltagare-confirm__header">Beskrivning</h3>
      <p>{{formGroup?.get('description').value}}</p>
    </ng-container>

    <h3 class="deltagare-confirm__header">Datum</h3>
    <p>{{formGroup?.get('date').value}}</p>
    <h3 class="deltagare-confirm__header">Hel- eller del av dag</h3>
    <p>{{formGroup.get('dayOrPartOfDay').value === 'HELDAG' ? 'Heldag' : 'Del av dag'}}</p>

    <ng-container *ngIf="formGroup.get('dayOrPartOfDay').value === 'DEL_AV_DAG'">
      <h3 class="deltagare-confirm-header">Startid</h3>
      <p>{{formGroup?.get('timepickerFormGroup').get('startTime').value}}</p>

      <h3 class="deltagare-confirm-header">Sluttid</h3>
      <p>{{formGroup?.get('timepickerFormGroup').get('endTime').value}}</p>
    </ng-container>
  </ng-container>

  <ng-container *ngIf="formGroup?.get('alternative').value === 'avvikelse'">
    <h3 class="deltagare-confirm-header">Avvikelseoorsak</h3>
    <ng-container *ngFor="let orsak of avvikelseOrsaker">
      <p *ngIf="orsak.value == formGroup?.get('orsakerFormGroup').get('orsaker').value">{{orsak.name}}</p>
    </ng-container>

    <h3 class="deltagare-confirm-header">Fråga 1</h3>
    <p>{{formGroup?.get('fragorFormGroup').get('fraga1').value}}</p>

    <ng-container *ngIf="formGroup?.get('fragorFormGroup').get('fraga2').value">
      <h3 class="deltagare-confirm-header">Fråga 2</h3>
      <p>{{formGroup?.get('fragorFormGroup').get('fraga2').value}}</p>
    </ng-container>

    <h3 class="deltagare-confirm-header">Datum</h3>
    <p>{{formGroup?.get('date').value}}</p>
  </ng-container>
</section>
