@import '@angular/material';

// Material table mixin
@mixin mat-table-override($theme) {
  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  $warn: map-get($theme, warn);
  $background: map-get($theme, background);
  $foreground: map-get($theme, foreground);
  $is-dark: map-get($theme, is-dark);

  $backgroundColor: map-get($background, background);
  @if $is-dark {
    $backgroundColor: map-get($mic-grey, 600);
  }

  @if $is-dark {
    $backgroundColor: map-get($mic-grey, 600);
  }

  th,
  .mat-mdc-header-cell,
  .mat-mdc-footer-row {
    color: map-get($foreground, text);
    font-size: 16px;
    font-weight: bold;
  }

  .mat-mdc-cell {
    letter-spacing: normal;
  }

  .mat-sort-header-arrow {
    color: map-get($primary, A400);
  }

  .table-stripped {
    tr:nth-child(even),
    .mat-mdc-row:nth-child(even) {
      background-color: $backgroundColor;

      &:hover {
        background-color: $backgroundColor;
      }
    }
  }

  .mat-mdc-paginator-container {
    background-color: $backgroundColor;
  }
}
