@use '@angular/material' as mat;
@use 'sass:map';
@use 'material-palettes' as palette;

@function define-light-theme($config) {
  $theme: mat.define-light-theme($config);
  $color: map.get($theme, color);
  $color: map.merge(
    $color,
    (
      background: palette.$light-theme-background-palette,
      foreground: palette.$light-theme-foreground-palette,
    )
  );
  @return map.merge(
    $theme,
    (
      color: $color,
    )
  );
}

@function define-dark-theme($config) {
  $theme: mat.define-dark-theme($config);
  $color: map.get($theme, color);
  $color: map.merge(
    $color,
    (
      background: palette.$dark-theme-background-palette,
      foreground: palette.$dark-theme-foreground-palette,
    )
  );
  @return map.merge(
    $theme,
    (
      color: $color,
    )
  );
}

