@use 'sass:map';
@use '~@angular/material' as mat;

@mixin color($theme) {
  $config: mat.get-color-config($theme);
  $foreground: map.get($config, foreground);
  $text: mat.get-color-from-palette($foreground, text);

  rds-c-code-select {
    .rds-c-clear-selected-codes,
    .bracket-effect::before,
    .bracket-effect::after {
      color: $text;
    }
    .mat-paginator {
      background: transparent;
    }
  }
}

@mixin typography($theme) {
  $typography-config: mat.get-typography-config(theme);
}

@mixin theme($theme) {
  $config: mat.get-color-config($theme);
  @if $config != null {
    @include color($theme);
  }

  $typography-config: mat.get-typography-config($theme);
  @if $typography-config != null {
    @include typography($theme);
  }
}
