@use 'sass:map';
@use '../../../style/sass-utils';
@use '../../token-definition';

// The prefix used to generate the fully qualified name for tokens in this file.
$prefix: (mat, radio);

/// Generates custom tokens for the mat-radio.
/// @param {Map} $systems The MDC system tokens
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
/// @param {Map} $token-slots Possible token slots
/// @return {Map} A set of custom tokens for the mat-radio
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
  $tokens: (
    (
      ripple-color: map.get($systems, md-sys-color, on-surface),
      checked-ripple-color: map.get($systems, md-sys-color, primary),
      disabled-label-color:
        sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
      label-text-color: map.get($systems, md-sys-color, on-surface),
      label-text-font: map.get($systems, md-sys-typescale, body-medium-font),
      label-text-line-height: map.get($systems, md-sys-typescale, body-medium-line-height),
      label-text-size: map.get($systems, md-sys-typescale, body-medium-size),
      label-text-tracking: map.get($systems, md-sys-typescale, body-medium-tracking),
      label-text-weight: map.get($systems, md-sys-typescale, body-medium-weight),
    ),
    (
      // Color variants:
      primary: (),
      // Default, no overrides needed
      secondary:
        (
          checked-ripple-color: map.get($systems, md-sys-color, secondary),
        ),
      tertiary: (
        checked-ripple-color: map.get($systems, md-sys-color, tertiary),
      ),
      error: (
        checked-ripple-color: map.get($systems, md-sys-color, error),
      )
    )
  );

  @return token-definition.namespace-tokens($prefix, $tokens, $token-slots);
}
