<?php
/**
 * The template part for header
 *
 * @package Anime Stream 
 * @subpackage anime-stream
 * @since anime-stream 1.0
 */
?>
<div class="left-top-sidebar">
  <div class="anime-stream-logo pb-3 position-relative">
    <?php if ( has_custom_logo() ) : ?>
      <div class="site-logo"><?php the_custom_logo(); ?></div>
    <?php endif; ?>
    <?php $anime_stream_blog_info = get_bloginfo( 'name' ); ?>
      <?php if ( ! empty( $anime_stream_blog_info ) ) : ?>
        <?php if ( is_front_page() && is_home() ) : ?>
          <?php if( get_theme_mod('anime_stream_logo_title_hide_show',true) == 1){ ?>
            <p class="site-title mb-0 text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
          <?php } ?>
        <?php else : ?>
          <?php if( get_theme_mod('anime_stream_logo_title_hide_show',true) == 1){ ?>
            <p class="site-title mb-0 text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
          <?php } ?>
        <?php endif; ?>
      <?php endif; ?>
      <?php
        $anime_stream_description = get_bloginfo( 'description', 'display' );
        if ( $anime_stream_description || is_customize_preview() ) :
      ?>
      <?php if( get_theme_mod('anime_stream_tagline_hide_show',false) == 1){ ?>
        <p class="site-description mb-0 text-center">
          <?php echo esc_html($anime_stream_description); ?>
        </p>
      <?php } ?>
    <?php endif; ?>
  </div>
  <div class="navigation_header pt-4">
    <div id="mySidenav" class="nav sidenav flex-column">
      <h3 class="menu-title text-capitalize pb-3 mb-4"><?php esc_html_e('menu','anime-stream'); ?></h3>
      <nav id="site-navigation" class="main-navigation navbar navbar-expand-xl" aria-label="<?php esc_attr_e( 'Top Menu', 'anime-stream' ); ?>">
        <?php {
          wp_nav_menu(
            array(
              'theme_location' => 'primary',
              'menu_class'     => 'menu', 
              'items_wrap'     => '<ul id="%1$s" class="%2$s">%3$s</ul>',
              'fallback_cb' => 'wp_page_menu',
            )
          );
        } ?>
      </nav>
    </div>
  </div>
  <?php if (get_theme_mod('anime_stream_hide_show_library_btn', true)) { ?>
    <div class="library-box mt-4">
      <h3 class="library-title text-capitalize pb-3 mb-4"><?php esc_html_e('library','anime-stream'); ?></h3>
      <?php if ( get_theme_mod('anime_stream_collection_button_url') != '' || get_theme_mod('anime_stream_collection_button_text') != '' ) {?>
        <div class ="collection-btn text-start pb-4 px-3">
          <a href="<?php echo esc_url(get_theme_mod('anime_stream_collection_button_url'));?>" class="text-capitalize d-flex align-items-center"><i class="<?php echo esc_attr(get_theme_mod('anime_stream_collection_button_icon','fa-solid fa-file')); ?> me-3"></i><?php echo esc_html(get_theme_mod('anime_stream_collection_button_text'));?>
          </a>
        </div>
      <?php }?>
      <?php if ( get_theme_mod('anime_stream_recent_button_url') != '' || get_theme_mod('anime_stream_recent_button_text') != '' ) {?>
        <div class ="recent-btn text-start pb-4 px-3">
          <a href="<?php echo esc_url(get_theme_mod('anime_stream_recent_button_url'));?>" class="text-capitalize d-flex align-items-center"><i class="<?php echo esc_attr(get_theme_mod('anime_stream_recent_button_icon','fa-solid fa-clock')); ?> me-3"></i><?php echo esc_html(get_theme_mod('anime_stream_recent_button_text'));?>
          </a>
        </div>
      <?php }?>
      <?php if ( get_theme_mod('anime_stream_favourites_button_url') != '' || get_theme_mod('anime_stream_favourites_button_text') != '' ) {?>
        <div class ="fav-btn text-start pb-4 px-3">
          <a href="<?php echo esc_url(get_theme_mod('anime_stream_favourites_button_url'));?>" class="text-capitalize d-flex align-items-center"><i class="<?php echo esc_attr(get_theme_mod('anime_stream_favourites_button_icon','fa-solid fa-star')); ?> me-3"></i><?php echo esc_html(get_theme_mod('anime_stream_favourites_button_text'));?>
          </a>
        </div>
      <?php }?>
    </div>
  <?php }?>
</div>
<div class="left-bottom-sidebar">
  <?php if ( get_theme_mod('anime_stream_sign_in_button_url') != '' || get_theme_mod('anime_stream_sign_in_button_text') != '' ) {?>
    <div class ="signin-btn text-start">
      <a href="<?php echo esc_url(get_theme_mod('anime_stream_sign_in_button_url'));?>" class="text-capitalize"><i class="<?php echo esc_attr(get_theme_mod('anime_stream_sign_in_button_icon','fa-solid fa-user')); ?> me-2"></i><?php echo esc_html(get_theme_mod('anime_stream_sign_in_button_text'));?>
      </a>
    </div>
  <?php }?>
</div>