<ion-header>
    <ion-toolbar>
        <ion-buttons slot="start">
            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
        </ion-buttons>
        <ion-title>
            <h1>
                <core-format-text [text]="title" contextLevel="module" [contextInstanceId]="cmId" [courseId]="courseId">
                </core-format-text>
            </h1>
        </ion-title>
        <ion-buttons slot="end">
            <core-button-with-spinner *ngIf="showToc" [loading]="loadingToc">
                <ion-button fill="clear" *ngIf="toc.length" (click)="openToc()" [attr.aria-label]="'addon.mod_scorm.toc' | translate"
                    aria-haspopup="true">
                    <ion-icon name="fas-bookmark" slot="icon-only" aria-hidden="true"></ion-icon>
                </ion-button>
            </core-button-with-spinner>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content>
    <core-loading [hideUntil]="loaded">
        <core-iframe *ngIf="loaded && src" [src]="src" [iframeWidth]="scormWidth" [iframeHeight]="scormHeight"
            [showFullscreenOnToolbar]="true" [autoFullscreenOnRotate]="true">
        </core-iframe>

        <p *ngIf="!src && errorMessage">{{ errorMessage | translate }}</p>
    </core-loading>

    <core-navigation-bar collapsible-footer appearOnBottom *ngIf="loaded && navigationItems.length > 1" [items]="navigationItems"
        (action)="loadSco($event)" slot="fixed">
    </core-navigation-bar>
</ion-content>
