@use 'sass:map';
@use '../core/tokens/m3-utils';
@use '../core/tokens/m3';

/// Generates custom tokens for the mtx-split.
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
  $system: m3-utils.get-system($theme);
  @if $color-variant {
    $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
  }

  $tokens: (
    base: (),
    color: (
      split-gutter-background-color: map.get($system, outline-variant),
      split-gutter-hover-state-background-color: map.get($system, primary),
    ),
    typography: (),
    density: (),
  );

  @return $tokens;
}
