<?php

/**
 * Class EAPSGT_Utils
 */
class EAPSGT_Utils {

	/**
	 * @param $trigger
	 *
	 * @return string
	 */
	public static function getTriggerCssClass( $trigger ) {
		$triggers    = EAPSGT_AnimatedPopupConfig::triggers();
		$prefixClass = 'eapsgt-';
		if ( key_exists( $trigger, $triggers ) ) {
			return $prefixClass . $triggers[ $trigger ];
		}

		return '';
	}

	/**
	 * @param $frequency
	 * @param $frequencyDefault
	 *
	 * @return string
	 */
	public static function getFrequencyValueClass( $frequency, $frequencyDefault ) {
		$frequencyValue = EAPSGT_AnimatedPopupConfig::frequencyValue();
		if ( key_exists( $frequency, $frequencyValue ) ) {
			return $frequencyValue[ $frequency ];
		}

		return $frequencyDefault;
	}
}
