$cds-duration-instant: 50; 		// Микровзаимодействия, такие как кнопка и переключатель
$cds-duration-very-fast: 100;  // Микровзаимодействия, такие как исчезновение
$cds-duration-fast: 200; 			// Микровзаимодействия, небольшое раскрытие элементов, перемещения на короткие расстояния
$cds-duration-normal: 300; 		// Раскрытие элементов, системные сообщения, всплывающие элементы
$cds-duration-slow: 400; 			// Раскрытие большого элемента, важные системные уведомления
$cds-duration-very-slow: 500; // Затемнение фона

/*
* Easing component
* @type Map
*/
$easing: (
  ease-in-out: (
    basic: cubic-bezier(0.37, 0, 0.63, 1),
    accent: cubic-bezier(0.45, 0, 0.55, 1),
  ),
  ease-in: (
    basic: cubic-bezier(0.12, 0, 0.39, 0),
    accent: cubic-bezier(0.11, 0, 0.5, 0),
  ),
  ease-out: (
    basic: cubic-bezier(0.61, 1, 0.88, 1),
    accent: cubic-bezier(0.5, 1, 0.89, 1),
  ),
);

/*
* Get the transition-timing-function for a given easing and motion mode
* @param {String} $type - Can be `ease-in-out`, `ease-in`, or `ease-out`
* @param {String} $mode [basic] - Can be `basic` or `accent`
* @param {Map} $easing [$easing] - Easing's map
* @return {Function} CSS `cubic-bezier()` function
*/
@function getMotion($type, $mode: basic, $easing: $easing) {
  @if map-has-key($easing, $type) {
    $easing: map-get($easing, $type);
    @if map-has-key($easing, $mode) {
      @return map-get($easing, $mode);
    } @else {
      @error 'Easing mode #{$easing}: called #{$mode} not found.';
    }
  } @else {
    @error 'Easing named #{$type} was not found.';
  }
}

/*
* Set the transition-timing-function for a given easing and motion mode
* @param {Number} $duration — The dynamic duration in ms
* @param {String} $type - The name of the easing curve to apply
* @param {String} $mode - The mode for the easing curve to use
*/
@mixin cds-animation-motion($duration, $type, $mode) {
  transition: ($duration + ms) getMotion($type, $mode);
}
