<div class="btn-group"
     dropdown>
  <ng-container *ngIf="getCurrentButton() as action">
    <button type="button"
            class="btn btn-{{btnColor}}"
            [ngClass]="{'disabled': disableSelectionAction(action)}"
            (click)="useClickAction(action)"
            [routerLink]="useRouterLink(action)"
            [preserveFragment]="action.preserveFragment ? '' : null">
      <i [ngClass]="[action.icon]"></i><span>{{ action.name }}</span>
    </button>
  </ng-container>
  <button type="button"
          dropdownToggle
          *ngIf="showDropDownActions()"
          class="btn btn-{{btnColor}} dropdown-toggle dropdown-toggle-split">
    <ng-container *ngIf="dropDownOnly">{{ dropDownOnly }} </ng-container>
    <span *ngIf="!dropDownOnly"
          class="sr-only"></span>
  </button>
  <ul *dropdownMenu
      class="dropdown-menu"
      role="menu">
    <ng-container *ngFor="let action of dropDownActions">
      <li role="menuitem"
          class="{{ toClassName(action['name']) }}"
          data-toggle="tooltip"
          title="{{ useDisableDesc(action) }}">
        <a class="dropdown-item"
           (click)="useClickAction(action)"
           [routerLink]="useRouterLink(action)"
           [preserveFragment]="action.preserveFragment ? '' : null"
           [ngClass]="{'disabled': disableSelectionAction(action)}">
          <i [ngClass]="[action.icon]"></i><span>{{ action.name }}</span>
        </a>
      </li>
    </ng-container>
  </ul>
</div>
