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

$st = $this->setting;

$effect  = ' data-first-show="' . $st->getSetting( 'first_show_type', 'show' ) . '"';
$effect .= ' data-show-delay="' . $st->getSetting( 'first_show_delay', 5 ) . '"';

//Exit
$mobile = $st->getSetting( 'show_exit_intent', 'false' );
if ( $mobile == 'true' ) {
	$effect .= ' data-exit-intent="1"';
} else {
	$effect .= ' data-exit-intent="0"';
}
//Scroll
$mobile = $st->getSetting( 'show_user_scroll', 'false' );
if ( $mobile == 'true' ) {
	$effect .= ' data-user-scroll="1"';
	$effect .= ' data-scroll-id="' . $st->getSetting( 'show_user_scroll_id', '' ) . '"';
	$effect .= ' data-scroll-height="' . $st->getSetting( 'show_user_scroll_height', 0 ) . '"';
} else {
	$effect .= ' data-user-scroll="0"';
}
//Inactive
$mobile = $st->getSetting( 'show_user_inactive', 'false' );
if ( $mobile == 'true' ) {
	$effect .= ' data-user-inactive="1"';
	$effect .= ' data-inactive-time="' . $st->getSetting( 'show_user_inactive_time', 5 ) . '"';
} else {
	$effect .= ' data-user-inactive="0"';
}
//Cookies
$cookie = $st->getSetting( 'enable_cookies', 'true' );
if ( $cookie == 'true' ) {
	$effect .= ' data-cookies="1"';
	$effect .= ' data-conversion="' . $st->getSetting( 'repeat_conversion', 7 ) . '"';
	$effect .= ' data-closing="' . $st->getSetting( 'repeat_closing', 7 ) . '"';
} else {
	$effect .= ' data-cookies="0"';
}
//Mobile
$mobile = $st->getSetting( 'hide_on_mobile', 'true' );
if ( $mobile == 'true' ) {
	$effect .= ' data-disable-mobile="1"';
} else {
	$effect .= ' data-disable-mobile="0"';
}
?>

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