<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after
 *
 * @package bb wedding bliss
 */
?>
<footer role="contentinfo">
  <?php if (get_theme_mod('bb_wedding_bliss_show_hide_footer', true)){ ?>
    <?php //Set widget areas classes based on user choice
      $bb_wedding_bliss_widget_areas = get_theme_mod('bb_wedding_bliss_footer_widget_areas', '4');
      if ($bb_wedding_bliss_widget_areas == '3') {
        $bb_wedding_bliss_cols = 'col-lg-4 col-md-4';
      } elseif ($bb_wedding_bliss_widget_areas == '4') {
        $bb_wedding_bliss_cols = 'col-lg-3 col-md-3';
      } elseif ($bb_wedding_bliss_widget_areas == '2') {
        $bb_wedding_bliss_cols = 'col-lg-6 col-md-6';
      } else {
        $bb_wedding_bliss_cols = 'col-lg-12 col-md-12';
      }
    ?>
    <div id="footer" class="copyright-wrapper">
      <div class="container">
        <div class="row wow bounceInUp">
          <!-- Footer Column 1 -->
          <div class="sidebar-column <?php echo esc_attr($bb_wedding_bliss_cols); ?>">
            <?php if (is_active_sidebar('footer-1')) : ?>
              <?php dynamic_sidebar('footer-1'); ?>
            <?php else : ?>
              <aside id="calendar" role="complementary" aria-label="firstsidebar" class="widget">
                <h2 class="widget-title"><?php esc_html_e('Calendar', 'bb-wedding-bliss'); ?></h2>
                <?php get_calendar(); ?>
              </aside>
            <?php endif; ?>
          </div>

          <!-- Footer Column 2 -->
          <div class="sidebar-column <?php echo esc_attr($bb_wedding_bliss_cols); ?>">
            <?php if (is_active_sidebar('footer-2')) : ?>
              <?php dynamic_sidebar('footer-2'); ?>
            <?php else : ?>
              <aside id="categories" role="complementary" aria-label="secondsidebar" class="widget">
                <h2 class="widget-title"><?php esc_html_e('Categories', 'bb-wedding-bliss'); ?></h2>
                <ul>
                  <?php wp_list_categories(array('title_li' => '')); ?>
                </ul>
              </aside>
            <?php endif; ?>
          </div>

          <!-- Footer Column 3 -->
          <div class="sidebar-column <?php echo esc_attr($bb_wedding_bliss_cols); ?>">
            <?php if (is_active_sidebar('footer-3')) : ?>
              <?php dynamic_sidebar('footer-3'); ?>
            <?php else : ?>
              <aside id="search" role="complementary" aria-label="thirdsidebar" class="widget">
                <h2 class="widget-title"><?php esc_html_e('Search', 'bb-wedding-bliss'); ?></h2>
                <?php get_search_form(); ?>
              </aside>
            <?php endif; ?>
          </div>

          <!-- Footer Column 4 -->
          <div class="sidebar-column <?php echo esc_attr($bb_wedding_bliss_cols); ?>">
            <?php if (is_active_sidebar('footer-4')) : ?>
              <?php dynamic_sidebar('footer-4'); ?>
            <?php else : ?>
              <aside id="meta" role="complementary" aria-label="fourthsidebar" class="widget">
                <h2 class="widget-title"><?php esc_html_e('Meta', 'bb-wedding-bliss'); ?></h2>
                <ul>
                  <?php wp_register(); ?>
                  <li><?php wp_loginout(); ?></li>
                </ul>
              </aside>
            <?php endif; ?>
          </div>
        </div>
      </div>
    </div>
  <?php }?>
 <div class="footer <?php if( get_theme_mod( 'bb_wedding_bliss_copyright_sticky', false) == 1) { ?> copyright-sticky<?php } else { ?>close-sticky <?php } ?>"> 
  <?php if (get_theme_mod('bb_wedding_bliss_show_hide_copyright', true)) {?>
    <div class="abovecopyright">
      <div class="container">
        <div class="row wow bounceInUp">
          <div class="copyright col-lg-6 col-md-12 col-10">
            <p><?php bb_wedding_bliss_credit(); ?> <?php echo esc_html(get_theme_mod('bb_wedding_bliss_footer_copy',__('By Themescaliber','bb-wedding-bliss'))); ?> </p>
          </div>
          <?php if (get_theme_mod('bb_wedding_bliss_show_hide_footer_social_icon', false)) {?>
            <div class="social-media col-lg-6 col-md-1 col-1 text-lg-end">
              <?php if( get_theme_mod( 'bb_wedding_bliss_youtube_url' ) != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_youtube_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_youtube_icon','fab fa-youtube')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Youtube','bb-wedding-bliss' );?></span></a>
              <?php } ?>
              <?php if( get_theme_mod( 'bb_wedding_bliss_facebook_url') != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_facebook_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_facebook_icon','fab fa-facebook-f')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Facebook','bb-wedding-bliss' );?></span></a>
              <?php } ?>
              <?php if( get_theme_mod( 'bb_wedding_bliss_twitter_url') != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_twitter_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_twitter_icon','fab fa-twitter')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Twitter','bb-wedding-bliss' );?></span></a>
              <?php } ?>
              <?php if( get_theme_mod( 'bb_wedding_bliss_rss_url') != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_rss_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_rss_icon','fas fa-rss')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'RSS','bb-wedding-bliss' );?></span></a>
              <?php } ?>
              <?php if( get_theme_mod( 'bb_wedding_bliss_insta_url') != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_insta_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_insta_icon','fab fa-instagram')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Instagram','bb-wedding-bliss' );?></span></a>
              <?php } ?>
              <?php if( get_theme_mod( 'bb_wedding_bliss_pint_url') != '') { ?>
                <a target="_blank" href="<?php echo esc_url( get_theme_mod( 'bb_wedding_bliss_pint_url','' ) ); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_pint_icon','fab fa-pinterest-p')); ?> me-4" aria-hidden="true"></i><span class="screen-reader-text"><?php esc_html_e( 'Pinterest','bb-wedding-bliss' );?></span></a>
              <?php } ?>
            </div>
          <?php }?>
          </div>
        </div>
      </div>
      <div class="clear"></div>
    </div>
  <?php }?>
</footer>  
<?php if( get_theme_mod( 'bb_wedding_bliss_enable_disable_scroll',true) != '' || get_theme_mod( 'bb_wedding_bliss_responsive_scroll',true) != '') { ?>
  <?php $bb_wedding_bliss_theme_lay = get_theme_mod( 'bb_wedding_bliss_scroll_setting','Right');
  if($bb_wedding_bliss_theme_lay == 'Left'){ ?>
    <button id="scroll-top" class="left-align" title="<?php esc_attr_e('Scroll to Top','bb-wedding-bliss'); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_back_to_top_icon','fas fa-chevron-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e('Scroll to Top', 'bb-wedding-bliss'); ?></span></button>
  <?php }else if($bb_wedding_bliss_theme_lay == 'Center'){ ?>
    <button id="scroll-top" class="center-align" title="<?php esc_attr_e('Scroll to Top','bb-wedding-bliss'); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_back_to_top_icon','fas fa-chevron-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e('Scroll to Top', 'bb-wedding-bliss'); ?></span></button>
  <?php }else{ ?>
    <button id="scroll-top" title="<?php esc_attr_e('Scroll to Top','bb-wedding-bliss'); ?>"><i class="<?php echo esc_attr(get_theme_mod('bb_wedding_bliss_back_to_top_icon','fas fa-chevron-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e('Scroll to Top', 'bb-wedding-bliss'); ?></span></button>
  <?php }?>
<?php }?>

<?php wp_footer(); ?>
</body>
</html>