<?php
/**
 * Template part for displaying the Mobile Header
 *
 * @package code4rest
 */

namespace Code4rest;

?>

<div id="mobile-header" class="site-mobile-header-wrap">
	<div class="site-header-inner-wrap<?php echo esc_attr( 'top_main_bottom' === code4rest()->option( 'mobile_header_sticky' ) ? ' code4rest-sticky-header' : '' ); ?>"<?php
	if ( 'top_main_bottom' === code4rest()->option( 'mobile_header_sticky' ) ) {
		echo ' data-shrink="' . ( code4rest()->option( 'mobile_header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
		echo ' data-reveal-scroll-up="' . ( code4rest()->option( 'mobile_header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
		if ( code4rest()->option( 'mobile_header_sticky_shrink' ) ) {
			echo ' data-shrink-height="' . esc_attr( code4rest()->sub_option( 'mobile_header_sticky_main_shrink', 'size' ) ) . '"';
		}
	}
	?>>
		<div class="site-header-upper-wrap">
			<div class="site-header-upper-inner-wrap<?php echo esc_attr( 'top_main' === code4rest()->option( 'mobile_header_sticky' ) ? ' code4rest-sticky-header' : '' ); ?>"<?php
			if ( 'top_main' === code4rest()->option( 'mobile_header_sticky' ) ) {
				echo ' data-shrink="' . ( code4rest()->option( 'mobile_header_sticky_shrink' ) ? 'true' : 'false' ) . '"';
				echo ' data-reveal-scroll-up="' . ( code4rest()->option( 'mobile_header_reveal_scroll_up' ) ? 'true' : 'false' ) . '"';
				if ( code4rest()->option( 'mobile_header_sticky_shrink' ) ) {
					echo ' data-shrink-height="' . esc_attr( code4rest()->sub_option( 'mobile_header_sticky_main_shrink', 'size' ) ) . '"';
				}
			}
			?>>
			<?php
			/**
			 * Code4rest Top Header
			 *
			 * Hooked code4rest_mobile_top_header 10
			 */
			do_action( 'code4rest_mobile_top_header' );
			/**
			 * Code4rest Main Header
			 *
			 * Hooked code4rest_mobile_main_header 10
			 */
			do_action( 'code4rest_mobile_main_header' );
			?>
			</div>
		</div>
		<?php
		/**
		 * Code4rest Mobile Bottom Header
		 *
		 * Hooked code4rest_mobile_bottom_header 10
		 */
		do_action( 'code4rest_mobile_bottom_header' );
		?>
	</div>
</div>
