<?php
/**
 * Template part for displaying content located in the bottom footer.
 *
 * Responsible for rendering elements in the footer's bottom section.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Yaatra
 */

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

?>
<div class="cv-bottom-area-wrapper">

    <?php
        $yaatra_footer_logo = yaatra_get_customizer_option_value( 'yaatra_footer_logo_image' );
        if ( ! empty( $yaatra_footer_logo ) ) {
    ?>
            <div class="cv-footer-logo">
                <figure><img src="<?php echo esc_url( $yaatra_footer_logo ); ?>" /></figure>
            </div><!-- .cv-footer-logo -->
    <?php } ?>

    <div class="cv-footer-right-wrapper">

        <nav id="site-footer-navigation" class="footer-navigation">
            <?php wp_nav_menu( array( 'theme_location' => 'yaatra_footer_menu', 'menu_id' => 'footer-menu', 'fallback_cb' => false ) ); ?>
        </nav><!-- #site-navigation -->

        <div class="cv-bottom-wrapper clearfix">
            <div class="cv-social-icons-wrapper">
                <?php
                    //footer social icons
                    get_template_part( 'template-parts/partials/social', 'icons' );
                ?>
            </div><!-- .cv-social-icons-wrapper -->
            <div class="site-info">
                <span class="cv-copyright-text">
                    <?php 
                        $yaatra_copyright_text = yaatra_get_customizer_option_value( 'yaatra_copyright_text' );
                        echo wp_kses_post( str_replace( '{year}', date('Y'), $yaatra_copyright_text ) );
                    ?>
                </span>
                <span class="sep"> | </span>
                    <?php
                        /* translators: 1: Theme name, 2: Theme author. */
                        printf( esc_html__( 'Theme: %1$s by %2$s.', 'yaatra' ), 'yaatra', '<a href="https://codevibrant.com/">CodeVibrant</a>' );
                    ?>
            </div><!-- .site-info -->
        </div><!-- .cv-bottom-wrapper -->

    </div><!-- .cv-footer-right-wrapper -->

</div><!-- .cv-bottom-area-wrapper -->