<?php
/**
 * Footer template part for displaying the scroll-to-top button.
 *
 * Responsible for rendering the scroll-to-top feature in the footer.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Yaatra
 */

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

$yaatra_scroll_top_option = yaatra_get_customizer_option_value( 'yaatra_scroll_top_option' );

if ( false === $yaatra_scroll_top_option ) {
    return;
}

$scroll_top_label = apply_filters( 'yaatra_scroll_top_label', __( 'Back To Top', 'yaatra' ) );

/**
 * hook - yaatra_before_scroll_top
 * 
 * @since 1.1.0
 */
do_action( 'yaatra_before_scroll_top' );
?>
    <div id="cv-scrollup" class="animated arrow-hide">
        <?php echo esc_html( $scroll_top_label ); ?>
    </div><!-- #cv-scrollup -->
<?php
/**
 * hook - yaatra_after_scroll_top
 * 
 * @since 1.1.0
 */
do_action( 'yaatra_after_scroll_top' );