@import '../core/theming/palette';
@import '../core/theming/theming';


@mixin mat-sidenav-theme($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);

  // We use invert() here to have the darken the background color expected to be used. If the
  // background is light, we use a dark backdrop. If the background is dark,
  // we use a light backdrop.
  $drawer-backdrop-color: invert(mat-color($background, card, 0.6)) !default;
  $drawer-background-color: mat-color($background, dialog) !default;
  $drawer-container-background-color:  mat-color($background, background) !default;
  $drawer-push-background-color: mat-color($background, dialog) !default;

  .mat-drawer-container {
    background-color: $drawer-container-background-color;
    color: mat-color($foreground, text);
  }

  .mat-drawer {
    background-color: $drawer-background-color;
    color: mat-color($foreground, text);

    &.mat-drawer-push {
      background-color: $drawer-push-background-color;
    }
  }

  .mat-drawer-backdrop.mat-drawer-shown {
    background-color: $drawer-backdrop-color;
  }
}

@mixin mat-sidenav-typography($config) { }
