<?php
/**
 * The template for top header
 *
 * @package MatrixAddons
 * @subpackage trainify
 * @since 1.0.0
 */
?>
<div class="tff-top-header-wrap">
	<div class="tff-container">
		<?php $trainify_date_option = get_theme_mod( 'trainify_top_date_option', 'show' ); ?>
		<div class="tff-top-left-section-wrapper">
			<?php do_action('trainify_topheader_toggleicon' ); ?>
			<?php
			if ( $trainify_date_option == 'show' ) {
				echo '<div class="date-section">' . esc_html( date_i18n( 'l, F d, Y' ) ) . '</div>';
			}
			 if ( has_nav_menu( 'trainify_top_menu' ) ) { ?>
				<nav id="top-navigation" class="top-navigation" role="navigation">
					<?php
					wp_nav_menu( array(
                        'depth'          => 1,
                        'menu_id'        => 'top-menu',
                        'theme_location' => 'trainify_top_menu',
                        'fallback_cb' => 'trainify_custom_fallback_menu'
                    ) );
					?>
				</nav><!-- #site-navigation -->
			<?php } ?>
		</div><!-- .tff-top-left-section-wrapper -->
		<div class="tff-top-right-section-wrapper">
			<?php
			$trainify_top_social_option = get_theme_mod( 'trainify_top_social_option', 'show' );
			if ( $trainify_top_social_option == 'show' ) {
				trainify_social_media();
			}
			?>
		</div><!-- .tff-top-right-section-wrapper -->
	</div>
</div>

<?php
do_action( 'trainify_topheader_widgetarea' );
