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

@mixin daff-callout-theme-variant($color) {
	background: $color;
	color: daff-text-contrast($color);
}

@mixin daff-callout-theme($theme) {
	$primary: daff-get-palette($theme, primary);
	$secondary: daff-get-palette($theme, secondary);
	$tertiary: daff-get-palette($theme, tertiary);
	$neutral: daff-get-palette($theme, neutral);
	$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');
	$mode: daff-get-theme-mode($theme);

	.daff-callout {
		@include light($mode) {
			@include daff-callout-theme-variant(daff-color($neutral, 10));

			&.daff-primary {
				@include daff-callout-theme-variant(daff-color($primary));
			}

			&.daff-secondary {
				@include daff-callout-theme-variant(daff-color($secondary));
			}

			&.daff-tertiary {
				@include daff-callout-theme-variant(daff-color($tertiary));
			}
		}

		@include dark($mode) {
			@include daff-callout-theme-variant(daff-color($neutral, 90));

			&.daff-primary {
				@include daff-callout-theme-variant(daff-color($primary, 60));
			}

			&.daff-secondary {
				@include daff-callout-theme-variant(daff-color($secondary, 60));
			}

			&.daff-tertiary {
				@include daff-callout-theme-variant(daff-color($tertiary, 60));
			}
		}

		&.daff-theme {
			@include daff-callout-theme-variant($base);
		}

		&.daff-theme-contrast {
			@include daff-callout-theme-variant($base-contrast);
		}

		&.daff-black {
			@include daff-callout-theme-variant($black);
		}

		&.daff-white {
			@include daff-callout-theme-variant($white);
		}
	}
}
