<?php

namespace Elementor\Modules\Interactions;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Presets {
	const DEFAULT_DURATION = 600;
	const DEFAULT_DELAY = 0;
	const DEFAULT_SLIDE_DISTANCE = 100;
	const DEFAULT_SCALE_START = 0;
	const DEFAULT_RELATIVE_TO = 'viewport';
	const DEFAULT_END = 15;
	const DEFAULT_START = 85;

	const BASE_TRIGGERS = [ 'load', 'scrollIn' ];
	const ADDITIONAL_TRIGGERS = [ 'scrollOut', 'scrollOn', 'hover', 'click' ];

	const DEFAULT_EASING = 'easeIn';
	const BASE_EFFECTS = [ 'fade', 'slide', 'scale' ];
	const ADDITIONAL_EFFECTS = [ 'custom' ];

	const TYPES = [ 'in', 'out' ];
	const DIRECTIONS = [ 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right', '' ];

	const BASE_EASING = [ 'easeIn' ];
	const ADDITIONAL_EASING = [ 'easeOut', 'easeInOut', 'backIn', 'backInOut', 'backOut', 'linear' ];

	const DEFAULT_REPEAT = '';
	const REPEAT_OPTIONS = [ 'loop', 'times', '' ];

	public static function easing_options() {
		return array_merge( self::BASE_EASING, self::ADDITIONAL_EASING );
	}

	public static function effects_options() {
		return array_merge( self::BASE_EFFECTS, self::ADDITIONAL_EFFECTS );
	}

	public static function triggers_options() {
		return array_merge( self::BASE_TRIGGERS, self::ADDITIONAL_TRIGGERS );
	}

	public function defaults() {
		return [
			'defaultDuration' => self::DEFAULT_DURATION,
			'defaultDelay' => self::DEFAULT_DELAY,
			'slideDistance' => self::DEFAULT_SLIDE_DISTANCE,
			'scaleStart' => self::DEFAULT_SCALE_START,
			'defaultEasing' => self::DEFAULT_EASING,
			'relativeTo' => self::DEFAULT_RELATIVE_TO,
			'repeat' => self::DEFAULT_REPEAT,
			'start' => self::DEFAULT_START,
			'end' => self::DEFAULT_END,
		];
	}
}
