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

////
/// 
/// Flip 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
// ============================================================================


///
/// Flip Animation
/// Creates a flip animation that rotates an element around a 3D axis.
/// 
/// @name animate_flip
/// @param {Number|String} $duration [$animate_base_duration] - The duration of the flip animation.
/// @param {String} $timing_function [ease-in-out] - The timing function for the flip animation.
/// @param {Number|String} $iteration_count [$animate_base_iteration_count] - The number of iterations the animation will run.
/// @param {Number} $rotate_x [0] - The X-axis rotation factor.
/// @param {Number} $rotate_y [1] - The Y-axis rotation factor.
/// @param {Number} $rotate_z [0] - The Z-axis rotation factor.
/// @param {Number|String} $rotate_start-angle [0] - The starting angle of rotation.
/// @param {Number|String} $rotate_end-angle [360deg] - The ending angle of rotation.
///
@mixin animate_flip(
    $duration: $animate_base_duration,
    $timing_function: ease-in-out,
    $iteration_count: $animate_base_iteration_count,
    $rotate_x: 0,
    $rotate_y: 1,
    $rotate_z: 0,
    $rotate_start-angle: 0,
    $rotate_end-angle: 360deg
) {
    @include animate_base(
        animate_flip,
        $duration,
        $timing_function,
        $iteration_count,
    );
    @keyframes animate_flip {
        0% { transform: rotate3d($rotate_x, $rotate_y, $rotate_z, $rotate_start-angle); }
        100% { transform: rotate3d($rotate_x, $rotate_y, $rotate_z, $rotate_end-angle); }
    }
}
