<div class="main">
  <div class="block" *ngIf="editMode">
    <div class="inline-menu default">
      <a *ngIf="registryOptions?.operations" type="a" class="add" (click)="add()"></a>
      <a title="Переместить">
        <ico ico="drag-n-drop_24"></ico>
      </a>
      <a title="Редактировать" (click)="edit()">
        <ico ico="edit_24"></ico>
      </a>
      <a title="Удалить" (click)="delete()">
        <ico ico="trash_24"></ico>
      </a>
    </div>
  </div>
  <div class="block row">
    <div class="name">
      <a class="document" *ngIf="link" [href]="link" target="_blank">{{title}}</a>
      <div>
        <div>
          Код
        </div>
        <div>
          {{entry.code}}
        </div>
      </div>
      <div>
        <div>
          Расшифровка
        </div>
        <div>
          {{entry.title}}
        </div>
      </div>
    </div>
    <button class="toggle" *ngIf="isExpandable">
      <drop-down ico="expand_circle_up_24" [target]="details"></drop-down>
    </button>
  </div>
  <div class="block" *ngIf="registryOptions?.states && activeSince">
    <div class="state {{entry.state?.name}}">{{entry.state?.title}}</div>
    <div class="dates">
      <table class="default">
        <tr><td class="caption">Дата выдачи</td><td class="value">{{activeSince || '—'}}</td></tr>
        <tr><td class="caption">Срок действия</td><td class="value">{{activeTill || '—'}}</td></tr>
      </table>
    </div>
  </div>
  
</div>
<div class="details" #details>
  <div>
    <div>
      Описание
    </div>
    <div>
      {{description}}
    </div>
  </div>
  <div class="block" *ngIf="registryOptions?.properties">
    <entry-properties [entry]="entry"></entry-properties>
  </div>
  <div class="block" *ngIf="registryOptions?.operations">
    <entry-operations [entry]="entry" [editMode]="editMode"></entry-operations>
  </div>
</div>
