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


if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
$register_template        = gigneo_option( '_gigneo_ts_template_register' );
$forgot_password_template = gigneo_option( '_gigneo_ts_template_forgot_password' );
$registration_disable     = ! empty( gigneo_option( '_gigneo_ts_disable_registration' ) );
?>
<form id="gn-auth-login" class="gn-auth-form gn-auth-login-form" data-action="gigneo_auth_login">
	<div class="gn-auth-heading-area">
		<h3 class="gn-title"><?php echo esc_html__( 'Welcome back', 'gigneo' ); ?></h3>
		<p class="gn-description"><?php echo esc_html__( 'Please sign in to continue.', 'gigneo' ); ?></p>
	</div>
	<?php if ( in_array( 'social_auth', gigneo_active_modules(), true ) ) { ?>
		<div class="gn-social-auth gn-social-auth-login">
			<?php do_action( 'gigneo_social_auth_login' ); ?>
		</div>
	<?php } ?>
	<?php do_action( 'gigneo_auth_before_login_fields' ); ?>
	<div class="gn-form-fields gn-auth-form-fields">
		<div class="gn-form-field">
			<label for="gn-login-email"><?php echo esc_html__( 'Email', 'gigneo' ); ?></label>
			<input id="gn-login-email" type="text" class="gn-required-field" name="email" placeholder="<?php echo esc_html__( 'Enter email address', 'gigneo' ); ?>" />
		</div>
		<div class="gn-form-field">
			<label for="gn-login-password"><?php echo esc_html__( 'Password', 'gigneo' ); ?></label>
			<div class="gn-auth-input-wrapper">
				<input id="gn-login-password" type="password" class="gn-required-field" name="password" autocomplete="current-password" placeholder="<?php echo esc_html__( 'Enter password', 'gigneo' ); ?>" />
				<i class="hi hi-eye-slash gn-password-revealed" aria-hidden="true"></i>
			</div>
		</div>
		<div class="gn-form-field">
			<div class="gn-form-field-checkbox">
				<input id="gn-remember-me" type="checkbox" name="remember_me" />
				<label for="gn-remember-me"><?php echo esc_html__( 'Remember me', 'gigneo' ); ?></label>
			</div>
			<a href="<?php echo esc_url( get_permalink( $forgot_password_template ) ); ?>" class="gn-forgot-password"><?php echo esc_html__( 'Forgot password?', 'gigneo' ); ?></a>
		</div>
	</div>
	<?php do_action( 'gigneo_auth_after_login_fields' ); ?>
	<div class="gn-auth-actions">
		<button id="gn-login-form-submit-btn" type="submit" class="gn-auth-action-btn gn-btn gn-btn-primary">
			<?php echo esc_html__( 'Sign in', 'gigneo' ); ?>
		</button>
		<?php if ( ! $registration_disable ) { ?>
		<p class="gn-auth-action-text">
			<?php echo esc_html__( "Don't have an account?", 'gigneo' ); ?>
			<a href="<?php echo esc_url( get_permalink( $register_template ) ); ?>" class="gn-sign-up"><?php echo esc_html__( 'Sign Up', 'gigneo' ); ?></a>
		</p>
		<?php } ?>
		<?php do_action( 'gigneo_auth_after_login_actions' ); ?>
	</div>
</form>