<ion-header>
    <ion-navbar core-back-button>
        <ion-title>{{ 'addon.mod_book.toc' | 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>
    <nav>
        <ion-list>
            <a ion-item text-wrap *ngFor="let chapter of chapters" (click)="loadChapter(chapter.id)" [class.core-nav-item-selected]="selected == chapter.id">
                <p [attr.padding-left]="chapter.level == 1 ? true : null">{{chapter.title}}</p>
            </a>
        </ion-list>
    </nav>
</ion-content>
