<?php if( ! defined( 'ABSPATH' ) ) exit;
/**
 * Enqueue scripts and styles.
 */
function atmospheres__animations_scripts() {	
	wp_enqueue_style( 'style-aos-css', SEOS_THEME_URI . '/include/animations/aos.css' );
	wp_enqueue_script( 'style-aos-js', SEOS_THEME_URI . '/include/animations/aos.js', array(), '', true);
	wp_enqueue_script( 'style-aos-options-js', SEOS_THEME_URI . '/include/animations/aos-options.js', array(), '', true);
}
add_action( 'wp_enqueue_scripts', 'atmospheres__animations_scripts' );
function  atmospheres__animation ($animation) {
	if ( get_theme_mod( $animation ) != "none" and get_theme_mod( $animation ) != ""  )  {
		return "data-aos-delay='300'"." ".
		"data-aos-duration='1000'"." ".
		"data-aos='".esc_html ( get_theme_mod( $animation ) )."'";
	}
	if ( get_theme_mod( $animation  ) == "" ) {
		return "data-aos-delay='300'"." ".
		"data-aos-duration='1000'"." ".
		"data-aos='zoom-out-down'";		
	}
}
function atmospheres__animations() {
	$array = array(
				'' => esc_attr__( 'Default', 'atmospheres' ),			
				'none' => esc_attr__( 'Deactivate Animation', 'atmospheres' ),			
				'fade' => esc_attr__( 'fade', 'atmospheres' ),
				'fade-up' => esc_attr__( 'fade-up', 'atmospheres' ),
				'fade-down' => esc_attr__( 'fade-down', 'atmospheres' ),
				'fade-left' => esc_attr__( 'fade-left', 'atmospheres' ),
				'fade-right' => esc_attr__( 'fade-right', 'atmospheres' ),
				'fade-up-right' => esc_attr__( 'fade-up-right', 'atmospheres' ),
				'fade-up-left' => esc_attr__( 'fade-up-left', 'atmospheres' ),
				'fade-down-right' => esc_attr__( 'fade-down-right', 'atmospheres' ),
				'fade-down-left' => esc_attr__( 'fade-down-left', 'atmospheres' ),
				'flip-up' => esc_attr__( 'flip-up', 'atmospheres' ),
				'flip-down' => esc_attr__( 'flip-down', 'atmospheres' ),
				'flip-left' => esc_attr__( 'flip-left', 'atmospheres' ),
				'flip-right' => esc_attr__( 'flip-right', 'atmospheres' ),
				'slide-up' => esc_attr__( 'slide-up', 'atmospheres' ),
				'slide-down' => esc_attr__( 'slide-down', 'atmospheres' ),
				'slide-left' => esc_attr__( 'slide-left', 'atmospheres' ),
				'slide-right' => esc_attr__( 'slide-right', 'atmospheres' ),
				'zoom-in' => esc_attr__( 'zoom-in', 'atmospheres' ),
				'zoom-in-up' => esc_attr__( 'zoom-in-up', 'atmospheres' ),
				'zoom-in-down' => esc_attr__( 'zoom-in-down', 'atmospheres' ),
				'zoom-in-left' => esc_attr__( 'zoom-in-left', 'atmospheres' ),
				'zoom-in-right' => esc_attr__( 'zoom-in-right', 'atmospheres' ),
				'zoom-out' => esc_attr__( 'zoom-out', 'atmospheres' ),
				'zoom-out-up' => esc_attr__( 'zoom-out-up', 'atmospheres' ),
				'zoom-out-down' => esc_attr__( 'zoom-out-down', 'atmospheres' ),
				'zoom-out-left' => esc_attr__( 'zoom-out-left', 'atmospheres' ),
				'zoom-out-right' => esc_attr__( 'zoom-out-right', 'atmospheres' ),
				);
	return $array;
}
		function atmospheres__sanitize_animations( $input ) {
			$valid = atmospheres__animations();
			if ( array_key_exists( $input, $valid ) ) {
				return $input;
			} else {
				return '';
			}
		}


