/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

$ouiSideNavEmphasizedBackgroundColor: transparentize($ouiColorLightShade, .7);

// Simulates the transparent backround on top of the page background to get an opaque color
// in order to get the right contrast for text
@function ouiSideNavEmphasizedContrast($textColor, $ratio: $ouiContrastRatioText) {
  $backgroundColorSimulated: mix($ouiPageBackgroundColor, $ouiColorLightShade, 70%);
  $color: makeHighContrastColor($textColor, $backgroundColorSimulated, $ratio);
  @return $color;
}

// Ensure all the possible text color have proper contrast when "emphasized"
$ouiSideNavRootTextcolor: ouiSideNavEmphasizedContrast($ouiTitleColor);
$ouiSideNavBranchTextcolor: ouiSideNavEmphasizedContrast($ouiTextSubduedColor);
$ouiSideNavSelectedTextcolor: ouiSideNavEmphasizedContrast($ouiColorPrimary);
$ouiSideNavDisabledTextcolor: ouiSideNavEmphasizedContrast($ouiButtonColorDisabledText, $ouiContrastRatioDisabled);


/* OUI -> EUI Aliases */
$euiSideNavEmphasizedBackgroundColor: $ouiSideNavEmphasizedBackgroundColor;
$euiSideNavRootTextcolor: $ouiSideNavRootTextcolor;
$euiSideNavBranchTextcolor: $ouiSideNavBranchTextcolor;
$euiSideNavSelectedTextcolor: $ouiSideNavSelectedTextcolor;
$euiSideNavDisabledTextcolor: $ouiSideNavDisabledTextcolor;
@function euiSideNavEmphasizedContrast($textColor, $ratio: $ouiContrastRatioText) { @return ouiSideNavEmphasizedContrast($textColor, $ratio); }
/* End of Aliases */
