<app-breadcrumb [breadcrumb]="breadcrumb" />
<section class="log-in-section background-image-2 section-b-space">
  <div class="container-fluid-lg w-100">
    <div class="row">
      <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/log-in.png" class="img-fluid" alt="update password" />
        </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>{{ 'reset_your_account_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="password"
                    class="form-control"
                    id="newPassword"
                    formControlName="newPassword"
                    placeholder="{{ 'password' | translate }}"
                  />
                  <label for="newPassword">{{ 'new_password' | translate }}</label>

                  @if(form.controls['newPassword'].touched &&
                  form.controls['newPassword'].errors?.['required']){
                  <div class="invalid-feedback">{{ 'new_password_is_required' | translate }}</div>
                  }
                </div>
              </div>
              <div class="col-12">
                <div class="form-floating theme-form-floating log-in-form">
                  <input
                    type="password"
                    class="form-control"
                    id="confirmPassword"
                    formControlName="confirmPassword"
                    placeholder="{{ 'confirm_password' | translate }}"
                  />
                  <label for="confirmPassword">{{ 'confirm_password' | translate }}</label>

                  @if(form.controls['confirmPassword'].touched &&
                  form.controls['confirmPassword'].errors?.['required']){
                  <div class="invalid-feedback">
                    {{ 'confirm_password_is_required' | translate }}
                  </div>
                  }
                </div>
              </div>
              <div class="col-12">
                <app-button [id]="'confirm_pass_btn'">{{ 'submit' | translate }}</app-button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
