@use '../../scss/theming' as *;

@mixin daff-progress-bar-theme($theme) {
	$primary: daff-get-palette($theme, primary);
	$secondary: daff-get-palette($theme, secondary);
	$tertiary: daff-get-palette($theme, tertiary);
	$base: daff-get-base-color($theme, base);
	$base-contrast: daff-get-base-color($theme, base-contrast);
	$white: daff-get-base-color($theme, 'white');
	$black: daff-get-base-color($theme, 'black');
	$neutral: daff-get-palette($theme, neutral);
	$mode: daff-get-theme-mode($theme);

	.daff-progress-bar {
		$root: '.daff-progress-bar';

		#{$root}__label {
			color: daff-text-contrast($base);
		}

		@include light($mode) {
			#{$root}__track {
				background: daff-color($neutral, 30);
			}
		}

		@include dark($mode) {
			#{$root}__track {
				background: daff-color($neutral, 80);
			}
		}

		&.daff-primary {
			#{$root}__fill {
				background: daff-color($primary);
			}
		}

		&.daff-secondary {
			#{$root}__fill {
				background: daff-color($secondary);
			}
		}

		&.daff-tertiary {
			#{$root}__fill {
				background: daff-color($tertiary);
			}
		}

		&.daff-theme {
			#{$root}__fill {
				background: $base;
			}
		}

		&.daff-theme-contrast {
			#{$root}__fill {
				background: $base-contrast;
			}
		}

		&.daff-light {
			#{$root}__fill {
				background: $white;
			}
		}

		&.daff-dark {
			#{$root}__fill {
				background: $black;
			}
		}
	}
}
