// stylelint-disable declaration-no-important
@use '@angular/material' as mat;

@mixin sc-fill-theme($theme) {
  $primary: map-get($theme, primary);
  $accent: map-get($theme, accent);
  $success: map-get($theme, success);
  $warning: map-get($theme, warning);
  $danger: map-get($theme, danger);
  $foreground: map-get($theme, foreground);
  $background: map-get($theme, background);
  $scBackground: map-get($theme, sc-background);
  $is-dark-theme: map-get($theme, is-dark);

  $black-and-white: if(
    $is-dark-theme,rgb(0,0,0),rgb(255,255,255)
  );

  .fill-text,
  .fill-text-default {
    fill: mat.get-color-from-palette($foreground, text) !important;
  }

  .fill-text-secondary,
  .fill-text-muted {
    fill: mat.get-color-from-palette($foreground, secondary-text) !important;
  }

  .fill-text-disabled {
    fill: mat.get-color-from-palette($foreground, disabled-text) !important;
  }

  .fill-primary {
    fill: mat.get-color-from-palette($primary, 500) !important;
  }

  .fill-accent {
    fill: mat.get-color-from-palette($accent, 500) !important;
  }

  .fill-grey {
    fill: #9E9E9E; // mat-grey 500
  }

  .fill-success {
    fill: map-get($success, 500) !important;
  }

  .fill-warning {
    fill: map-get($warning, 500) !important;
  }

  .fill-danger {
    fill: map-get($danger, 500) !important;
  }

  .fill-card {
    fill: mat.get-color-from-palette($background, card) !important;
  }

  .fill-card-inverted {
    fill: map-get($scBackground, card-inverted) !important;
  }

  .fill-card-light {
    fill: #ffffff !important;
  }

  .fill-card-dark {
    fill: #424242 !important;
  }

  .fill-black-and-white {
    fill: $black-and-white;
  }
}
