<?php
/**
 * Effect setting
 *
 * @package wp-viral-click
 * @author InstaProduct
 * @link http://insta-product.com/
 */

$st = $this->setting;

$effect  = ' data-delay="' . $st->getSetting( 'show_delay', 0 ) . '"';
$effect .= ' data-show_effect="' . $st->getSetting( 'show_effect', 'none' ) . '"';
$effect .= ' data-show_speed="' . $st->getSetting( 'show_effect_speed', 500 ) . '"';
$effect .= ' data-hide_effect="' . $st->getSetting( 'hide_effect', 'none' ) . '"';
$effect .= ' data-hide_speed="' . $st->getSetting( 'hide_effect_speed', 500 ) . '"';
if ( isset( $this->isPreview )) {
  $effect .= ' data-ispreview="1"';
} else {
  $effect .= ' data-ispreview="0"';
}
//Mobile
$mobile = $st->getSetting( 'disabled_animation_mobile', 'true' );
if ( $mobile == 'true' ) {
	$effect .= ' data-disable-mobile="1"';
} else {
	$effect .= ' data-disable-mobile="0"';
}
?>

<div class="ipjck-setting-effect"<?php echo $effect; ?>></div>

<?php
//
//Show Audio
$showAudio = $st->getSetting( 'show_audio', 0 );
if ( ! empty( $showAudio ) ) :
  $path = IPJCK_BASE_URL . 'assets/audio/audio-' . $showAudio;
?>
<audio class="ipjck-audio ipjck-audio-show" style="display:none;">
  <source src="<?php echo $path; ?>.mp3" type="audio/mpeg">
  <source src="<?php echo $path; ?>.ogg" type="audio/ogg">
  <?php _e( 'Your browser does not support this audio format.', IPJCK_SLUG ); ?>
</audio>
<?php
endif;

//
//Hide Audio
$hideAudio = $st->getSetting( 'hide_audio', 0 );
if ( ! empty( $hideAudio ) ) :
  $path = IPJCK_BASE_URL . 'assets/audio/audio-' . $hideAudio;
?>
<audio class="ipjck-audio ipjck-audio-hide" style="display:none;">
  <source src="<?php echo $path; ?>.mp3" type="audio/mpeg">
  <source src="<?php echo $path; ?>.ogg" type="audio/ogg">
  <?php _e( 'Your browser does not support this audio format.', IPJCK_SLUG ); ?>
</audio>
<?php
endif;
?>