<?php
/**
 * Header user icon section template
 *
 * @package wpstream-theme
 */

$wpstream_theme_header_design_type = get_theme_mod( 'wpstream_theme_header_design_type', 'header-type-1' );
$wpstream_theme_display_login_menu = get_theme_mod( 'wpstream_theme_display_login_menu', true);


if ( ! is_user_logged_in() && 'header-type-1' === $wpstream_theme_header_design_type && $wpstream_theme_display_login_menu ) { ?>

	<button class="btn btn-outline-secondary wpstream-theme-login-btn type-2-button-style" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-user" aria-controls="offcanvas-user">
		<span class=""><?php esc_html_e( 'Log In', 'hello-wpstream' ); ?></span>
	</button>

	<button class="btn btn-outline-secondary wpstream-theme-sign-up-btn type-1-button-style" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-user" aria-controls="offcanvas-user">
		<span class=""><?php esc_html_e( 'Sign Up', 'hello-wpstream' ); ?></span>
	</button>

<?php } elseif ( ( ! is_user_logged_in() && ( 'header-type-2' === $wpstream_theme_header_design_type || 'header-type-3' === $wpstream_theme_header_design_type ) ) && $wpstream_theme_display_login_menu ) { ?>

	<button class="btn btn-outline-secondary wpstream-theme-sign-up-btn type-2-button-style" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-user" aria-controls="offcanvas-user">
		<span class="wpstreamtheme-hide-on-mobile"><?php esc_html_e( 'Log In / Sign Up', 'hello-wpstream' ); ?></span>
		<span class="wpstreamtheme-show-on-mobile"><?php esc_html_e( 'Log In', 'hello-wpstream' ); ?></span>
	</button>

<?php } ?>

<?php if ( is_user_logged_in()  && $wpstream_theme_display_login_menu && class_exists( 'Wpstream_Player' ) ) { ?>

	<button class="btn btn-outline-secondary wpstream-theme-user-icon" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-user" aria-controls="offcanvas-user">
		
		<?php
		echo wpstream_theme_get_svg_icon( 'account-icon.svg' );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		?>

		<span class="visually-hidden-focusable"><?php esc_html_e( 'Account', 'hello-wpstream' ); ?></span>

	</button>

<?php } ?>