////
///
/// Rubber Animations Mixin Module
/// ===========================================================================
///
/// Provides rubber band-style stretching and squashing animations.
/// Creates elastic, bouncy effects that simulate rubber material physics.
/// Perfect for playful UI elements and attention-grabbing effects.
///
/// @group Animations
/// @author Scape Agency
/// @link https://move.gl
/// @since 0.1.0 initial release
/// @access public
///
////


// ============================================================================
// Use
// ============================================================================

@use "../../dev" as *;
@use "../../variables" as *;
@use "../keyframes" as *;
@use "base" as *;


// ============================================================================
// Mixins
// ============================================================================


///
/// Rubber Band Animation
/// ---------------------------------------------------------------------------
/// Creates a rubber band-style stretching and squashing effect.
///
/// @name animate_rubber_band
/// @param {Number} $intensity [1.25] - Stretch/squash intensity factor
/// @param {Time} $duration [$animate_base_duration] - Animation duration
/// @param {String} $timing_function [ease-in-out] - Timing function
/// @param {Number|String} $iteration_count [1] - Number of iterations
///
/// @example scss - Basic usage
///   .bouncy-element {
///     @include animate_rubber_band;
///   }
///
@mixin animate_rubber_band(
    $intensity: 1.25,
    $duration: $animate_base_duration,
    $timing_function: ease-in-out,
    $iteration_count: 1
) {
    @include animate_base(
        animate_rubber_band,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_rubber_band($intensity);
}


///
/// Subtle Rubber Band Animation
/// A gentler rubber band effect.
///
/// @name animate_rubber_band_subtle
/// @param {Duration} $duration [$animate_base_duration] - The animation duration.
///
@mixin animate_rubber_band_subtle(
    $duration: $animate_base_duration
) {
    @include animate_rubber_band(1.1, $duration);
}


///
/// Intense Rubber Band Animation
/// A more dramatic rubber band effect.
///
/// @name animate_rubber_band_intense
/// @param {Duration} $duration [$animate_base_duration] - The animation duration.
///
@mixin animate_rubber_band_intense(
    $duration: $animate_base_duration
) {
    @include animate_rubber_band(1.4, $duration);
}


///
/// Rubber Squeeze Animation
/// Creates a horizontal squeeze effect.
///
/// @name animate_rubber_squeeze
/// @param {Number} $squeeze [0.8] - The squeeze factor (< 1 = thinner).
/// @param {Duration} $duration [$animate_base_duration_fast] - The animation duration.
/// @param {String} $timing_function [ease-out] - The timing function.
///
@mixin animate_rubber_squeeze(
    $squeeze: 0.8,
    $duration: $animate_base_duration_fast,
    $timing_function: ease-out
) {
    @include animate_base(
        animate_rubber_squeeze,
        $duration,
        $timing_function,
        1
    );
    @include keyframes_animate_rubber_squeeze($squeeze);
}
