@use "sass:meta";
@use "@angular/material" as mat;

@mixin _progress-bar-color($config-or-theme, $variants) {
    $config: mat.m2-get-color-config($config-or-theme);
    @each $variant, $variant-palette in $variants {
        &.mat-#{"" + $variant} {
            #{--mat-progress-bar-active-indicator-color}: mat.m2-get-color-from-palette($variant-palette);
            #{--mat-progress-bar-track-color}: mat.m2-get-color-from-palette($variant-palette, 500, 0.25);
        }
    }
}

@mixin color($config-or-theme, $variants) {
    $config: mat.m2-get-color-config($config-or-theme);
    .mat-mdc-progress-bar {
        @include _progress-bar-color($config, $variants);
    }
}
