<?php 
/**
 * The header Menu for our theme
 *
 * @package benqu
 */

$enable_top_bar = cs_get_option('enable_top_bar');
$benqu_social_opt = cs_get_option('benqu_social_opt');
$hide_login = cs_get_option('hide_login');
$social_title = cs_get_option('social_title');
$enable_social_profile = cs_get_option('enable_social_profile');
$display_header_ads = cs_get_option('display_header_ads');
$top_ads_img = cs_get_option('top_ads_img');
$top_ads_link = cs_get_option('top_ads_link');
$header_top_date = cs_get_option('header_top_date');
$breakingnewtext = cs_get_option('breakingnewtext');
$header_account_link = cs_get_option('header-user-link');
$display_sidebar_nav = cs_get_option('display_sidebar_nav');
$enable_header_search = cs_get_option('enable_header_search');
papyrfy_header_search_two();
?>
<header class="benqu-main-header pfy-header-2 bnq__header_three">
    <?php if(true == $enable_top_bar):?>
    <div class="pfy-top-bar" id="pfytopbar">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-7 col-md-7 col-6">
                    <div class="pfy-top-left">
                        <?php if($header_top_date == true):?>
                        <div class="topbar-date">
                            <span><i class="fal fa-calendar-alt"></i> <?php echo wp_date(get_option('date_format')); ?></span>
                        </div>
                        <?php endif;?>
                        <div class="tp-news-ticker">
                            <div class="breaking-heading"><i class="far fa-fire-alt"></i> <?php echo esc_html($breakingnewtext);?></div>
                            <?php get_template_part( 'template-parts/breaking-news' );?>
                        </div>
                    </div>
                </div>

                <div class="col-lg-5 col-md-5 col-6 text-end">
									<div class="pfy-top-right">
										<?php if($hide_login == true): ?>
											<div class="user-login">
												<a href="<?php if(!empty($header_account_link['url'])){ echo esc_url($header_account_link['url']); } else { echo '#'; } ?>"><i class="fas fa-user-alt"></i></a>
											</div>
										<?php endif;?>

										<?php if(true == $enable_social_profile): ?>
											<?php if(!empty($social_title)): ?>
												<div class="socila-title">                            
													<h5><?php echo esc_html($social_title);?></h5>
												</div>
											<?php endif; ?>

											<?php if(!empty($benqu_social_opt)): ?>
												<div class="social-info">
													<?php foreach($benqu_social_opt as $icon): ?>
														<a href="<?php echo esc_url($icon['link']);?>"><i class="<?php echo esc_attr($icon['icon']);?>"></i></a>
													<?php endforeach;?>
												</div>
											<?php endif; ?>
										<?php endif;?>
									</div>
                </div>
            </div>
        </div>
    </div>
    <?php endif;?>
    
    <div id="stickyHeader" class="header-menu">
        <div class="container-fluid">
            <div class="header-menu-opt d-flex justify-content-between align-items-center">
                <div class="pfy-logo d-flex  align-items-center">
                    <?php benqu_logo(); benqu_light_logo();?>
                </div>
                <div class="mainmenu">
                    <div class="site-navigation">
                        <?php benqu_mainmenu();?>
                    </div>
                </div>
                <div class="menu-right d-flex justify-content-between align-items-center">
										<?php if($enable_header_search == true): ?>
											<span class="pfy-search-btn"><i class="far fa-search"></i></span>
										<?php endif;?>

										<?php if($display_sidebar_nav == true): ?>
											<span class="pfy-sidebarnav"><img src="<?php echo get_template_directory_uri()?>/assets/img/nav.svg" alt="<?php esc_attr_e('Nav', 'benqu');?>"></span>
										<?php endif;?>

                    <div class="hamburger_menu d-lg-none">
                        <a href="javascript:void(0);" class="active">
                            <div class="icon bar">
                                <img src="<?php echo get_template_directory_uri()?>/assets/img/nav.svg" alt="<?php esc_attr_e('Nav', 'benqu');?>">
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<?php  get_template_part( 'inc/sidebar-nav' );?>
<div class="body-overlay"></div>
<?php  get_template_part( 'inc/mobile-menu' );?>