<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$auth_popup_image     = gigneo_option( '_gigneo_ts_auth_popup_image' );
$auth_popup_layout    = gigneo_option( '_gigneo_ts_auth_popup_layout', '1' );
$registration_disable = ! empty( gigneo_option( '_gigneo_ts_disable_registration' ) );
?>
<div id="gn-auth-popup" class="gn-auth-popup-wrapper gn-auth-popup-layout-<?php echo esc_attr( $auth_popup_layout ); ?>">
	<div class="gn-auth-popup-dialog">
		<div class="gn-auth-inner">
			<?php if ( ! empty( $auth_popup_image ) ) { ?>
				<div class="gn-auth-image">
					<?php echo wp_get_attachment_image( $auth_popup_image, 'large' ); ?>
				</div>
			<?php } ?>
			<div class="gn-auth-content">
				<button id="gn-auth-popup-close" class="gn-auth-popup-close">
					<i class="hi hi-x-mark" aria-hidden="true"></i>
				</button>
				<?php
				//Login
				require gigneo_get_template( 'auth/login' );
				//Register
				if ( ! $registration_disable ) {
					require gigneo_get_template( 'auth/register' );
				}
				//Forgot Password
				require gigneo_get_template( 'auth/forgot-password' );
				?>
			</div>
		</div>
	</div>
</div>