// ============================================================================
// Poster
// ============================================================================

////
/// 
/// Beat Animations Mixin Module
/// ===========================================================================
/// This module provides a set of SCSS mixins for creating various beat
/// animations, including basic beat, beat with fade, and double beat effects.
/// These mixins are designed to scale elements up and down in rhythmic
/// patterns, enhancing the visual dynamics of your designs.
/// 
/// @group Animations
/// @author Scape Agency
/// @link https://move.gl
/// @since 0.1.0 initial release
/// @todo None
/// @access public
/// 
////



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

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



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

///
/// Beat Animation
/// Creates a beat animation that scales an element up and down rhythmically.
///
/// @name animate_beat
/// @param {Number} $scale [$animate-scale-beat] - The scale factor for the beat animation.
/// @param {Number|String} $duration [$animate-base-duration] - The duration of the animation.
/// @param {String} $timing_function [$animate-base-timing-function] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate-base-iteration-count] - The number of iterations the animation will run.
///
@mixin animate_beat(
    $scale: $animate-scale-beat, 
    $duration: $animate-base-duration,
    $timing_function: $animate-base-timing-function, 
    $iteration_count: $animate-base-iteration-count
) {
    @include animate_base(
        animate_beat,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_beat($scale);
}

///
/// Beat Fade Animation
/// Combines a beat animation with a fade effect, scaling the element while
/// changing its opacity.
///
/// @name animate_beat_fade
/// @param {Number} $opacity [$animate-opacity-fade] - The opacity level at the start and end of the animation.
/// @param {Number} $scale [$animate-scale-beat-fade] - The scale factor for the beat animation.
/// @param {Number|String} $duration [$animate-base-duration] - The duration of the animation.
/// @param {String} $timing_function [$animate-base-timing-function-fade] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate-base-iteration-count] - The number of iterations the animation will run.
///
@mixin animate_beat_fade(
    $opacity: $animate-opacity-fade, 
    $scale: $animate-scale-beat-fade, 
    $duration: $animate-base-duration,
    $timing_function: $animate-base-timing-function-fade, 
    $iteration_count: $animate-base-iteration-count
) {
    @include animate_base(
        animate_beat_fade,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @include keyframes_animate_beat_fade($opacity, $scale);
}

///
/// Double Beat Animation
/// Creates a double beat animation where the element scales down, then up,
/// then down again, simulating a heartbeat or pulsating effect.
///
/// @name animate_beat_double
/// @param {Number} $scale-small [$animate-scale-beat-double-small] - The smaller scale factor for the double beat animation.
/// @param {Number} $scale-large [$animate-scale-beat-double-large] - The larger scale factor for the double beat animation.
/// @param {Number|String} $duration [$animate-base-duration] - The duration of the animation.
/// @param {String} $timing_function [$animate-base-timing-function] - The timing function for the animation.
/// @param {Number|String} $iteration_count [$animate-base-iteration-count] - The number of iterations the animation will run.
///
@mixin animate_beat_double(
    $scale-small: $animate-scale-beat-double-small,
    $scale-large: $animate-scale-beat-double-large,
    $duration: $animate-base-duration,
    $timing_function: $animate-base-timing-function,
    $iteration_count: $animate-base-iteration-count
) {
    @include animate_base(
        animate_beat_double,
        $duration,
        $timing_function,
        $iteration_count
    );
    @include keyframes_animate_beat_double($scale-small, $scale-large);
}
