<div class="content" *ngIf="page">
  <div class="row">
    <div class="page-header">
      <div class="limiter">
        <div class="line">
          <h1>{{page?.name}}</h1>
        </div>        
      </div>
    </div>
    <div class="limiter nav-info" *ngIf="isEditable">
      <div class="col right" (click)="toggleEditMode()">
        <div class="label">Режим редактирования</div><div class="switch" [class.active]="editMode"></div>
      </div>
    </div>    
  </div>
  <div  class="limiter">
    <page-breadcrumbs [page]="page"></page-breadcrumbs>
  </div>
  
  
  <div class="limiter pages" [ngSwitch]="page?.type?.name || page?.type">
    <content-page *ngSwitchCase="'content'" [page]="page" [editMode]="editMode"></content-page>
    <publications-page *ngSwitchCase="'publications'" [page]="page" [editMode]="editMode"></publications-page>
    <registry-page *ngSwitchCase="'registry'" [page]="page" [editMode]="editMode"></registry-page>
    <publication-page *ngSwitchCase="'publication'" [page]="page" [editMode]="editMode"></publication-page>
    <tk-structure-page *ngSwitchCase="'tk-structure'" [page]="page" [editMode]="editMode"></tk-structure-page>
    <p *ngSwitchDefault>Page type {{page?.type?.name}} is undefined</p>
  </div>
</div>
<div class="content" *ngIf="!loading && !page">
  <page-not-found></page-not-found>
</div>
<!--div class="loader" *ngIf="loading"></div-->
