<app-breadcrumb [breadcrumb]="breadcrumb" />
<section class="log-in-section section-b-space forgot-section">
  <div class="container-fluid-lg w-100">
    <div class="row align-items-center">
      <div class="col-xxl-6 col-xl-5 col-lg-6 d-lg-block d-none ms-auto">
        <div class="image-contain">
          <img src="assets/images/inner-page/forgot.png" class="img-fluid" alt="image" />
        </div>
      </div>
      <div class="col-xxl-4 col-xl-5 col-lg-6 col-sm-8 mx-auto">
        <app-alert />
        <div class="log-in-box">
          <div class="log-in-title">
            <h3>{{ 'welcome_to' | translate }} {{ (setting$ | async)?.general?.site_name }}</h3>
            <h4>{{ 'forgot_your_password' | translate }}</h4>
          </div>
          <div class="input-box">
            <form class="row g-4" [formGroup]="form" (ngSubmit)="submit()">
              <div class="col-12">
                <div class="form-floating theme-form-floating log-in-form">
                  <input
                    type="email"
                    class="form-control"
                    formControlName="email"
                    id="email"
                    placeholder="{{ 'email_address' | translate }}"
                  />
                  <label for="email">{{ 'email_address' | translate }}</label>

                  @if(form.controls['email'].touched &&
                  form.controls['email'].errors?.['required']){
                  <div class="invalid-feedback">{{ 'email_is_required' | translate }}</div>
                  } @if(form.controls['email'].touched && form.controls['email'].errors?.['email']){
                  <div class="invalid-feedback">{{ 'invalid_email' | translate }}</div>
                  }
                </div>
              </div>

              @if(reCaptcha){
              <div class="col-12">
                <re-captcha formControlName="recaptcha" />

                @if(form.controls['recaptcha'].touched &&
                form.controls['recaptcha'].errors?.['required']){
                <div class="invalid-feedback">{{ 'reCaptcha is required' | translate }}</div>
                }
              </div>
              }
              <div class="col-12">
                <app-button [id]="'forgot_btn'">{{ 'send' | translate }}</app-button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
