@use 'sass:map';
@use '@angular/material' as mat;
@use '../global';
@use '../themes';

$shape-radius: 8px;
$spacing: global.$spacing !default;

@mixin override-color($theme) {
  $-theme: map.get($theme, theme);

  .mat-mdc-card {
    @if $-theme == "dark" {
      background: themes.dark-color-overlay(4);
    } @else if $-theme == "light" {
      background: themes.light-color-overlay(0);
    }
  }
}

@mixin override-theme($theme) {
  $color-config: mat.get-color-config($theme);
  @if $color-config != null {
    @include override-color($theme);
  }

  .mat-mdc-card {
    border-radius: $shape-radius;
  }

  .mat-mdc-card-content {
    padding-top: $spacing*2;
  }
}
