<?php

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

$login_template    = gigneo_option( '_gigneo_ts_template_login' );
$password_strength = gigneo_option( '_gigneo_ts_password_strength', array( 'length' ) );
?>
<form id="gn-auth-change-password" class="gn-auth-change-password-form" data-action="gigneo_auth_change_password">
	<div class="gn-auth-heading-area">
		<h3 class="gn-title"><?php echo esc_html__( 'Change password', 'gigneo' ); ?></h3>
		<p class="gn-description"><?php echo esc_html__( 'Kindly enter your new password in the fields below to update and access to your account.', 'gigneo' ); ?></p>
	</div>
	<div class="gn-form-fields gn-auth-form-fields">
		<div class="gn-form-field">
		<label for="gn-change-password"><?php echo esc_html__( 'New password', 'gigneo' ); ?></label>
		<div class="gn-auth-input-wrapper">
			<input id="gn-change-password" type="password" class="gn-required-field" name="password" placeholder="<?php echo esc_html__( 'Enter new password', 'gigneo' ); ?>" />
			<i class="hi hi-eye-slash gn-password-revealed" aria-hidden="true"></i>
		</div>
		<ul class="gn-password-notice">
			<?php
			$password_strength_list = gigneo_password_strength_options();
			foreach ( $password_strength as $strength ) {
				?>
				<li class="<?php echo esc_attr( $strength ); ?>"><?php echo esc_html( $password_strength_list[ $strength ] ); ?></li>
			<?php } ?>
		</ul>
	</div>
	</div>
	<div class="gn-auth-actions">
		<button id="gn-change-password-form-submit-btn" type="submit" disabled class="gn-auth-action-btn gn-btn gn-btn-primary"><?php echo esc_html__( 'Change password', 'gigneo' ); ?></button>
		<p class="gn-auth-action-text">
			<?php echo esc_html__( 'Go back to', 'gigneo' ); ?>
			<a href="<?php echo esc_url( get_permalink( $login_template ) ); ?>" class="gn-sign-in"><?php echo esc_html__('Sign in','gigneo'); ?></a>
		</p>
	</div>
</form>
