@use "@angular/material" as mat;
@mixin sc-loader-theme($theme) {
  // Extract the palettes you need from the theme definition.
  $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);

  $is-dark-theme: map-get($theme, is-dark);

  .sc-loader-color {
    &-primary {
      .mat-progress-spinner svg circle {
        stroke: mat.get-color-from-palette($primary, 500);
      }
    }

    &-accent {
      .mat-progress-spinner svg circle {
        stroke: mat.get-color-from-palette($accent, 500);
      }
    }

    &-success {
      .mat-progress-spinner svg circle {
        stroke: mat.get-color-from-palette($success, 500);
      }
    }

    &-warning {
      .mat-progress-spinner svg circle {
        stroke: mat.get-color-from-palette($warning, 500);
      }
    }

    &-danger {
      .mat-progress-spinner svg circle {
        stroke: mat.get-color-from-palette($danger, 500);
      }
    }

    &-primary-contrast {
      .mat-progress-spinner svg circle {
        stroke: mat.get-contrast-color-from-palette($primary, 500);
      }
    }

    &-accent-contrast {
      .mat-progress-spinner svg circle {
        stroke: mat.get-contrast-color-from-palette($accent, 500);
      }
    }

    &-success-contrast {
      .mat-progress-spinner svg circle {
        stroke: mat.get-contrast-color-from-palette($success, 500);
      }
    }

    &-warning-contrast {
      .mat-progress-spinner svg circle {
        stroke: mat.get-contrast-color-from-palette($warning, 500);
      }
    }

    &-danger-contrast {
      .mat-progress-spinner svg circle {
        stroke: mat.get-contrast-color-from-palette($danger, 500);
      }
    }

  }
}
