@use 'sass:map';
@use '../base/colors';

@mixin mx-tooltip-theme($theme) {
  $is-dark: map.get($theme, is-dark);
  $current-theme: colors.$mx-light;

  @if $is-dark {
    $current-theme: colors.$mx-dark;
  }

  .mat-mdc-tooltip {
    .mdc-tooltip__surface {
      color: map.get($current-theme, inverseOnSurface);
      background-color: map.get($current-theme, inverseSurface) !important;
      max-width: 384px;
    }
  }

  .mdc-tooltip--multiline {
    white-space: pre-line;
  }
}
