@use 'sass:map';
@use '@angular/material' as mat;
@use '../global';
@use '../themes';

@mixin override-color($theme) {
  $color-config: mat.get-color-config($theme);

  @if map.get($theme, theme) == "dark" {
    &.dark-theme {
      .mat-mdc-menu-panel {
        background: themes.dark-color-overlay(8);
      }
    }
  }
}

@mixin override-theme($theme) {
  $color-config: mat.get-color-config($theme);
  @if $color-config != null {
    @include override-color($theme);
  }

  .mat-mdc-menu-panel {
    .mat-mdc-menu-content:not(:empty) {
      padding-left: global.$spacing * 0.5;
      padding-right: global.$spacing * 0.5;
    }
  }
}
