<ion-header>
    <ion-navbar core-back-button>
        <ion-title>{{ title | translate }}</ion-title>
        <ion-buttons end>
            <button ion-button icon-only (click)="closeModal()" [attr.aria-label]="'core.close' | translate">
                <ion-icon name="close"></ion-icon>
            </button>
        </ion-buttons>
    </ion-navbar>
</ion-header>
<ion-content padding class="addon-mod_quiz-preflight-modal">
    <core-loading [hideUntil]="loaded">
        <form ion-list [formGroup]="preflightForm" (ngSubmit)="sendData()">
            <!-- Access rules. -->
            <ng-container *ngFor="let data of accessRulesData; let last = last">
                <core-dynamic-component [component]="data.component" [data]="data.data">
                    <p padding>Couldn't find the directive to render this access rule.</p>
                </core-dynamic-component>
                <ion-item-divider color="light" *ngIf="!last"></ion-item-divider>
            </ng-container>

            <button ion-button block type="submit">
                {{ title | translate }}
            </button>
        </form>
    </core-loading>
</ion-content>
