<?php
/**
 * Class IS_Medify_Content_Menu_Header
 * 
 * @package IS-Medify
 * 
 * @since 1.0.0
 *  
*/
class IS_Medify_Content_Menu_Header {

	/**
	 * Class Construct Method.
	*/
	public function __construct() {
		$this->IS_Medify_Setup_Hook_Header_Menu();
	}

	/**
	 * IS_Medify_Setup_Hook_Header_Menu Function For Header Menu.
	*/
	public function IS_Medify_Setup_Hook_Header_Menu() {
		add_action( 'IS_Medify_Do_Function_Header_Menu', array( $this, 'IS_Medify_Header_Menu' ) );
	}

	/**
	 * IS-Medify Header Menu.
	*/
	public function IS_Medify_Header_Menu() { ?>
		<nav class="navbar  navbar-static-top marginBottom-0 menu" <?php if ( has_header_image() ) { ?> style='background-image: url("<?php header_image(); ?>")' <?php } ?>>
			<div class="container">
	            <div class="navbar-header">
					<div class="col-md-12 col-xs-10 logo">
					    <a href="<?php echo esc_url(home_url( '/' )); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" class="navbar-brand">
						  	<?php if(has_custom_logo())  { ?>
		                        <?php the_custom_logo(); ?>
		                    <?php } ?> 
	                    </a>

	                    <?php 
	                    if (display_header_text() == true) { ?>

	                        <p class="site-title">
	                        	<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
	                        </p>
	                        <?php
	                        
	                        $IS_Medify_Description = get_bloginfo( 'description', 'display' );
	                        if ( $IS_Medify_Description || is_customize_preview() ) : ?>

	                            <p class="site-description"><?php echo esc_html($IS_Medify_Description); ?></p>

	                        <?php 
	                        endif; 
	                    } 
	                    ?>
					</div>
					</div>
					<div class="collapse navbar-collapse" id="navbar-collapse-1">	
					
						<button type="button" id="hamburger-menu" class="open-nav-btn" aria-label="open navigation" aria-controls="link-list" aria-expanded="false">&#9776;</button>
						<div id="slide-nav" class="slide-content">
						<button type="button" id="close" class="close-btn" aria-label="close navigation">&times;</button>
						<?php 
						wp_nav_menu( 
							array(
								'theme_location' => 'menu-1',
								'menu_class' => 'nav navbar-nav navbar-right',
								'fallback_cb' => 'is_medify_fallback_page_menu',
								'walker' => new is_medify_nav_walker(),
							)
						); ?>
						</div>
				</div>
			</div>
	    </nav> 
		<?php
	}
}
new IS_Medify_Content_Menu_Header;