<?php 
$style_header = themesflat_get_opt('style_header');
if (themesflat_get_opt_elementor('style_header')) {
    $style_header = themesflat_get_opt_elementor('style_header');
} 

$nav_menu_header = 'primary';
if (themesflat_get_opt_elementor('nav_menu_header')) {
    $nav_menu_header = themesflat_get_opt_elementor('nav_menu_header');
}

if ($style_header == 'header-style3') {
    $args_menu = array(
        'menu'            => $nav_menu_header,
        'container'       => false,
        'container_class' => '',
        'container_id'    => '',
        'menu_class'      => 'menu pagepiling-menu pagepiling-one-page-menu',
        'menu_id'         => '',
        'echo'            => false,
        'fallback_cb'     => 'themesflat_menu_fallback',
        'before'          => '',
        'after'           => '',
        'link_before'     => '',
        'link_after'      => '',
        'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
        'item_spacing'    => 'preserve',
        'depth'           => 0,
        'walker'          => '',
        'theme_location'  => '',
    );

	function themesflat_pagepiling_add_menu_atts($atts){
	  $atts['data-menuanchor'] = str_replace("#","",$atts['href']);
	  return $atts;
	}
	add_filter('nav_menu_link_attributes', 'themesflat_pagepiling_add_menu_atts');		    
}
$logo_site = themesflat_get_opt('site_logo'); 
?>
<div class="modal-menu-left">
	<div class="modal-menu__backdrop"></div>
	<div class="modal-menu__body">
		<button class="modal-menu__close" type="button">
            <i class="fa fa-times"></i>
        </button>
        <div class="modal-menu__panel">
        	<div class="modal-menu__panel-header">
                <div class="modal-menu__panel-title">
                	<div class="header-modal-menu-left-btn">
                        <div class="text"><?php _e( 'Menu', 'zev' ); ?></div>
                        <div class="modal-menu-left-btn">
                            <div class="line line--1"></div>
                            <div class="line line--2"></div>
                            <div class="line line--3"></div>
                            <div class="line line--4"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-menu__panel-body">
				<div class="nav-wrap-secondary">
				    <nav id="mainnav-secondary" class="mainnav-secondary" role="navigation">
				        <?php
				            echo wp_nav_menu( $args_menu );
				        ?>
				    </nav><!-- #site-navigation -->  
				</div><!-- /.nav-wrap --> 
			</div>
			<div class="modal-menu__panel-footer">
				<?php if ( $logo_site ) : ?>
				    <div class="logo-panel" >                  
				        <a href="<?php echo esc_url( home_url('/') ); ?>"  title="<?php bloginfo('name'); ?>">
				            <?php if  (!empty($logo_site)) { ?>
				                <img class="site-logo"  src="<?php echo esc_url($logo_site); ?>" alt="<?php bloginfo('name'); ?>"/>
				            <?php } ?>
				        </a>
				    </div>          
				<?php endif; ?>
				<div class="socials-panel">
					<?php themesflat_render_social(); ?>
				</div>
			</div>
		</div>
	</div>
</div>  