<ion-header>
    <ion-toolbar>
        <ion-title>
            <h1>{{ 'addon.mod_quiz.quiznavigation' | translate }}</h1>
        </ion-title>
        <ion-buttons slot="end">
            <ion-button fill="clear" (click)="closeModal()" [attr.aria-label]="'core.close' | translate">
                <ion-icon slot="icon-only" name="fas-xmark" aria-hidden="true"></ion-icon>
            </ion-button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content class="addon-mod_quiz-navigation-modal">
    <nav>
        <ion-list>
            <ion-item button class="ion-text-wrap {{question.stateClass}}" *ngFor="let question of navigation"
                [attr.aria-current]="!summaryShown && currentPage == question.page ? 'page' : 'false'"
                (click)="loadPage(question.page, question.slot)" detail="false">

                <ion-label class="ion-text-wrap">
                    <span *ngIf="question.type !== 'description' && question.questionnumber">
                        {{ 'core.question.questionno' | translate:{$a: question.questionnumber} }}
                    </span>
                    <span *ngIf="question.type === 'description' || !question.questionnumber">
                        {{ 'core.question.information' | translate }}
                    </span>
                </ion-label>

                <ion-icon *ngIf="question.type === 'description' || !question.questionnumber" name="fas-circle-info" slot="end"
                    aria-hidden="true"></ion-icon>
                <ion-icon *ngIf="question.stateClass == 'core-question-requiresgrading'" name="fas-circle-question"
                    [attr.aria-label]="question.status" slot="end">
                </ion-icon>
                <ion-icon *ngIf="question.stateClass == 'core-question-correct'" name="fas-check" color="success"
                    [attr.aria-label]="question.status" slot="end">
                </ion-icon>
                <ion-icon *ngIf="question.stateClass == 'core-question-partiallycorrect'" name="fas-square-check" color="warning"
                    [attr.aria-label]="question.status" slot="end">
                </ion-icon>
                <ion-icon *ngIf="question.stateClass == 'core-question-incorrect' ||
                    question.stateClass == 'core-question-notanswered'" name="fas-xmark" color="danger" [attr.aria-label]="question.status"
                    slot="end">
                </ion-icon>
            </ion-item>
        </ion-list>
    </nav>
</ion-content>
<ion-footer *ngIf="!isReview">
    <!-- In player, show button to finish attempt. -->
    <ion-button class="ion-text-wrap ion-margin" expand="block" (click)="loadPage(-1)">
        {{ 'addon.mod_quiz.finishattemptdots' | translate }}
    </ion-button>
</ion-footer>
