<ng-container *transloco="let t; read: 'entity-title'">
  <ng-container [ngSwitch]="libraryType">
    <ng-container *ngSwitchCase="LibraryType.Comic">
      <ng-container *ngIf="titleName !== '' && prioritizeTitleName; else fullComicTitle">
        {{titleName}}
      </ng-container>
      <ng-template #fullComicTitle>
        {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
        <ng-container *ngIf="includeVolume && volumeTitle !== ''">
          {{entity.number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
        </ng-container>
        {{entity.number !== 0 ? (isChapter ? t('issue-num') + entity.number : volumeTitle) : t('special')}}
      </ng-template>
    </ng-container>
    <ng-container *ngSwitchCase="LibraryType.Manga">
      <ng-container *ngIf="titleName !== '' && prioritizeTitleName; else fullMangaTitle">
        {{titleName}}
      </ng-container>
      <ng-template #fullMangaTitle>
        {{seriesName.length > 0 ? seriesName + ' - ' : ''}}
        <ng-container *ngIf="includeVolume && volumeTitle !== ''">
          {{entity.number !== 0 ? (isChapter && includeVolume ? volumeTitle : '') : ''}}
        </ng-container>
        {{entity.number !== 0 ? (isChapter ? (t('chapter') + ' ')  + entity.number : volumeTitle) : t('special')}}
      </ng-template>
    </ng-container>
    <ng-container *ngSwitchCase="LibraryType.Book">
      {{volumeTitle}}
    </ng-container>
  </ng-container>
</ng-container>
