<?php
$options = roonix_WSH()->option();
$allowed_html = wp_kses_allowed_html( 'post' );

//Logo Settings
$image_normal_logo = $options->get( 'image_normal_logo' );
$normal_logo_dimension = $options->get( 'normal_logo_dimension' );

$image_small_logo = $options->get( 'image_small_logo' );
$small_logo_dimension = $options->get( 'small_logo_dimension' );

$image_mobile_logo = $options->get( 'image_mobile_logo' );
$mobile_logo_dimension = $options->get( 'mobile_logo_dimension' );

$logo_type = '';
$logo_text = '';
$logo_typography = ''; ?>

<div class="page-wrapper">

	
	<?php if( $options->get( 'theme_preloader' ) ):?>
        <!-- Preloader -->
	<div class="loader-wrap">
		<div class="preloader">
			<div class="preloader-close">x</div>
			<div id="handle-preloader" class="handle-preloader">
				<div class="animation-preloader">
					<div class="spinner"></div>
					<div class="txt-loading">
						<?php echo wp_kses($options->get('preloader_text'), true); ?>
					</div>
				</div>  
			</div>
		</div>
	</div>
	<!-- Preloader End -->
	<?php endif; ?>
    
    <!-- Main Header / Header Style Seven -->
    <header class="main-header header-style-seven">
    	
        <!-- Header Lower -->
        <div class="header-lower">
            
			<div class="auto-container">
				<div class="inner-container d-flex justify-content-between align-items-center flex-wrap">
					
					<div class="pull-left logo-box">
						<div class="logo"><?php echo roonix_logo( $logo_type, $image_normal_logo, $normal_logo_dimension, $logo_text, $logo_typography ); ?></div>
					</div>
					<div class="nav-outer clearfix">
						
						<!-- Mobile Navigation Toggler -->
						<div class="mobile-nav-toggler"><span class="icon flaticon-menu"></span></div>
						<!-- Main Menu -->
						<nav class="main-menu show navbar-expand-md">
							<div class="navbar-header">
								<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
									<span class="icon-bar"></span>
								</button>
							</div>
							
							<div class="navbar-collapse collapse clearfix" id="navbarSupportedContent">
								<ul class="navigation clearfix">
									<?php wp_nav_menu( array( 'theme_location' => 'main_menu', 'container_id' => 'navbar-collapse-1',
										'container_class'=>'navbar-collapse collapse navbar-right',
										'menu_class'=>'nav navbar-nav',
										'fallback_cb'=>false, 
										'items_wrap' => '%3$s', 
										'container'=>false,
										'depth'=>'3',
										'walker'=> new Bootstrap_walker()  
									) ); ?>
								</ul>
							</div>
							
						</nav>
						<!-- Main Menu End-->
						
					</div>
					<?php if($options->get('button_title_v7')):?>
					<!-- Outer Box -->
					<div class="outer-box clearfix">
						<div class="button-box text-center">
							<a href="<?php echo esc_attr($options->get('button_link_v7'));?>" class="theme-btn btn-style-two clearfix">
								<span class="btn-wrap">
									<span class="text-one"><?php echo wp_kses($options->get('button_title_v7'), true); ?></span>
									<span class="text-two"><?php echo wp_kses($options->get('button_title_v7'), true); ?></span>
								</span>
							</a>
						</div>
					</div>
					<!-- End Outer Box -->
					<?php endif; ?>
				</div>
				
			</div>
        </div>
        <!-- End Header Lower -->
        
		<!-- Sticky Header  -->
        <div class="sticky-header">
            <div class="auto-container clearfix">
                <!-- Logo -->
                <div class="logo pull-left">
                    <?php echo roonix_logo( $logo_type, $image_small_logo, $small_logo_dimension, $logo_text, $logo_typography ); ?>
                </div>
				
                <!--Right Col-->
                <div class="pull-right">
                    <!-- Main Menu -->
                    <nav class="main-menu">
                        <!--Keep This Empty / Menu will come through Javascript-->
                    </nav><!-- Main Menu End-->
					
					<div class="mobile-nav-toggler"><span class="icon flaticon-menu"></span></div>
					
                </div>
            </div>
        </div><!-- End Sticky Menu -->
    
		<!-- Mobile Menu  -->
        <div class="mobile-menu">
            <div class="menu-backdrop"></div>
            <div class="close-btn"><span class="icon flaticon-multiply"></span></div>
            <nav class="menu-box">
                <div class="nav-logo">
					<?php if ( class_exists( '\Elementor\Plugin' )):?>
						<?php echo roonix_logo( $logo_type, $image_mobile_logo, $mobile_logo_dimension, $logo_text, $logo_typography ); ?>
                    <?php else:?>
                        <a href="<?php echo esc_url( home_url( '/' ) );?>"><img src="<?php echo esc_url( get_template_directory_uri() );?>/assets/images/mobile-logo.svg" alt="<?php esc_attr_e( 'Mobile Logo', 'roonix' );?>"></a>
                    <?php endif;?>
					
                </div>
				<?php if($options->get('show_search_switcher_v7')):?>
                <!-- Search -->
				<div class="search-box">
					<?php echo esc_attr(get_template_part('searchform1')); ?>
				</div>
                <?php endif; ?>
                <div class="menu-outer"><!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header--></div>
            </nav>
        </div>
		<!-- End Mobile Menu -->
	
    </header>
    <!-- End Main Header -->
 