<ng-container [ngSwitch]="buttonType">
  <button *ngSwitchCase="'icon'" mat-icon-button color="primary" [matMenuTriggerFor]="commandMenu"
    [disabled]="disabled">
    <mat-icon>{{ icon }}</mat-icon>
  </button>

  <button class="action-button" [disabled]="clientData.length === 0 || disabled" *ngSwitchCase="'text'"
    [matMenuTriggerFor]="commandMenu">
    {{ buttonText }}
  </button>
</ng-container>

<mat-menu #commandMenu="matMenu">
  <button mat-menu-item [disabled]="command.disabled || (command.slug === 'create-image' && clientData.length > 1)"
    *ngFor="let command of arrayCommands" (click)="onCommandSelect(command.slug)">
    {{ command.name }}
  </button>
</mat-menu>