<div class="actions-toolbar">
  <div class="selection-info" *ngIf="selectedCount > 0">
    <span class="selection-count">
      {{ selectedCount }} élément(s) sélectionné(s) sur {{ totalCount }}
    </span>
  </div>
  
  <div class="action-buttons">
    <ng-container *ngFor="let cta of ctas; trackBy: trackByCta">
      <!-- Boutons normaux -->
      <button 
        *ngIf="getButtonType(cta.action) !== 'icon'"
        [attr.mat-raised-button]="getButtonType(cta.action) === 'raised' ? '' : null"
        [attr.mat-stroked-button]="getButtonType(cta.action) === 'stroked' ? '' : null"
        [color]="getButtonColor(cta.action)"
        [disabled]="!isActionAvailable(cta)"
        (click)="onActionClick(cta.action)"
        class="action-button"
        [attr.data-action]="cta.action">
        
        <mat-icon *ngIf="cta.icon">{{ cta.icon }}</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'create'">add</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'update'">edit</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'delete'">delete</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'export'">file_download</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'import'">file_upload</mat-icon>
        <mat-icon *ngIf="!cta.icon && cta.action === 'refresh'">refresh</mat-icon>
        
        <span class="button-text">{{ cta.label }}</span>
      </button>
      
      <!-- Boutons icône -->
      <button 
        *ngIf="getButtonType(cta.action) === 'icon'"
        mat-icon-button
        [disabled]="!isActionAvailable(cta)"
        (click)="onActionClick(cta.action)"
        [matTooltip]="cta.label"
        class="action-button icon-button"
        [attr.data-action]="cta.action">
        
        <mat-icon>{{ cta.icon || 'more_vert' }}</mat-icon>
      </button>
    </ng-container>
    
    <!-- Indicateur de chargement -->
    <mat-spinner 
      *ngIf="loading" 
      diameter="24" 
      class="loading-spinner">
    </mat-spinner>
  </div>
</div>

