@use '@finastra/fds-theme/color' as color;
@use '@finastra/fds-theme/typography' as typography;

@mixin theme($theme) {
  .mat-mdc-table {
    .mdc-data-table__row:not(.mdc-data-table__row--selected):hover {
      @include color.property(background-color, surface-selected);
    }
    tr {
      &.selected {
        @include color.property(background-color, surface-selected);
      }

      &.mdc-data-table__row--selected {
        @include color.property(background-color, surface-selected);
      }
    }

    &.uxg-table-alternate {
      tr {
        &:nth-child(even) {
          @include color.property(background-color, surface);
        }

        &.selected {
          @include color.property(background-color, surface-selected);
        }
      }
    }
  }
}

@mixin typography($config: null) {
  .mat-mdc-table {
    thead {
      tr {
        @include typography.typography(subtitle-2);
      }
    }

    tbody {
      tr {
        @include typography.typography(body-2);
      }
    }
  }
}
