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

////
/// 
/// Wave Animations Mixin Module
/// ===========================================================================
/// 
/// This module ...
/// 
/// 
/// @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
// ============================================================================




///
/// Wave Animation
/// Creates a wave effect by rotating an element back and forth.
/// @name animate_wave
/// @param {Angle} $angle [20deg] - The maximum rotation angle during the wave.
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - 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_wave(
    $angle: 20deg, 
    $duration: $animate_base_duration, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_wave,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_wave {
        0%, 100% { transform: rotate(0deg); }
        50% { transform: rotate($angle); }
    }
}


// Gentle Wave Animation
// ----------------------------------------------------------------------------

///
/// Gentle Wave Animation
/// A slower and subtler wave animation.
/// @name animate_wave_slow
/// @param {Angle} $angle [10deg] - The maximum rotation angle during the wave.
/// @param {Duration} $duration [$animate_base_duration_slow] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - 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_wave_slow(
    $angle: 10deg, 
    $duration: $animate_base_duration_slow,
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_wave_slow,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_wave_slow {
        0%, 100% { transform: rotate(0deg); }
        50% { transform: rotate($angle); }
    }
}



// Rapid Wave Animation
// ----------------------------------------------------------------------------

///
/// Rapid Wave Animation
/// A faster and more intense wave animation.
/// @name animate_wave_fast
/// @param {Angle} $angle [30deg] - The maximum rotation angle during the wave.
/// @param {Duration} $duration [$animate_base_duration_fast] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - 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_wave_fast(
    $angle: 30deg, 
    $duration: $animate_base_duration_fast, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_wave_fast,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_wave_fast {
        0%, 100% { transform: rotate(0deg); }
        50% { transform: rotate($angle); }
    }
}



// Wave with Fade Animation
// ----------------------------------------------------------------------------

///
/// Wave with Fade Animation
/// A wave animation combined with a fading effect.
/// @name animate_wave_fade
/// @param {Angle} $angle [20deg] - The maximum rotation angle during the wave.
/// @param {Duration} $duration [$animate_base_duration] - The duration of the animation.
/// @param {String} $timing_function [ease-in-out] - 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_wave_fade(
    $angle: 20deg, 
    $duration: $animate_base_duration, 
    $timing_function: ease-in-out, 
    $iteration_count: $animate_base_iteration_count
) {
    @include animate_base(
        animate_wave_fade
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_wave_fade {
        0%, 100% { 
            transform: rotate(0deg); 
            opacity: 1;
        }
        50% { 
            transform: rotate($angle); 
            opacity: 0.5;
        }
    }
}
