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

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

/// Generates custom tokens for the mat-icon-button.
/// @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-icon-button
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
  $tokens: (
    state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
    disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
    ripple-color: sass-utils.safe-color-change(
      map.get($systems, md-sys-color, on-surface-variant),
      $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
    ),
    hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
    focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
    pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
  );

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