<?php $options = get_option('kaveh_frame'); ?>
<?php
$page = get_page_by_path('klogin');
if (!empty($page)) {
  $page_id = $page->ID;
}
$account_page_id = get_option('woocommerce_myaccount_page_id');
?>
<?php if (!is_user_logged_in() && !is_page($page_id)): ?>
  <div id="auth-gajmarket" class="auth__modal">
    <div class="auth__modal__dialog">
      <button type="button"
        class="auth__modal__close auth__absolute auth__flex auth__items__center auth__content__center auth__b__white"
        aria-label="close">&times;</button>
      <div class="auth__modal__content">
        <div class="auth__modal__body">
          <div class="auth__page__twelve auth__mx__auto loadlogin">
            <!-- Start Logo -->
            <a href="<?php echo home_url(); ?>"
              class="auth__page__twelve__logo auth__block auth__mx__auto auth__w__fit auth__absolute">
              <img src="<?php echo $options['kaveh_logo_up'] ?>" alt="logo" width="127" height="40">
            </a>
            <!-- End Logo -->
            <div class="auth__page__twelve__wrapper auth__relative">
              <!-- Start Tabs -->
              <ul class="auth__page__twelve__tabs auth__flex auth__items__center auth__content__center">
                <li class="active auth__ease__in__out" data-auth-toggle="tab" data-auth-target="login"> ورود با پیامک</li>
                <li class="auth__ease__in__out" data-auth-toggle="tab" data-auth-target="register"> ورود با رمز</li>
              </ul>
              <!-- End Tabs -->
              <!-- Start Content -->
              <div class="auth__page__twelve__content">
                <!-- Start Tabs Contents -->
                <div class="auth__tab__content">
                  <?php if ($options['kaveh_login_type'] === 'option-1' || $options['kaveh_login_type'] === 'option-3'): ?>
                    <!-- Start Tab Content Login -->
                    <div id="login" class="active auth__tab__pane">
                      <img src="<?php echo KAVEH_TEMPLATE_URI . '/assets/images/user-avatar.svg'; ?>" alt="user"
                        width="105" height="105" class="auth__block auth__mx__auto">
                      <form class="smslogin" method="post" action="#">
                        <div class="auth__page__form__group position-relative">
                          <i class="isax isax-user iabs"></i>
                          <input id="phone" type="text" class="auth__page__form__control auth__ease__in__out"
                            placeholder=" شماره همراه را وارد کنید ...">
                        </div>
                        <br>
                        <button type="submit" class="auth__page__btn auth__page__btn__success auth__w__fit auth__block">
                          دریافت کد تایید </button>
                      </form>
                    </div>
                    <!-- End Tab Content Login -->
                    <!-- Start Tab Content Register -->
                    <div id="register" class="auth__tab__pane">
                      <img src="<?php echo KAVEH_TEMPLATE_URI . '/assets/images/user-avatar.svg'; ?>" alt="user"
                        width="105" height="105" class="auth__block auth__mx__auto">
                      <form class="passlogin" method="post" action="#">
                        <div class="auth__page__form__group position-relative">
                          <i class="iconly iconly-Message iabs"></i>
                          <input type="text" id="email" class="auth__page__form__control auth__ease__in__out"
                            placeholder="موبایل یا ایمیل معتبر">
                        </div>
                        <div class="auth__page__form__group position-relative">
                          <i class="iconly iconly-Password iabs"></i>
                          <input type="password" id="password" class="auth__page__form__control auth__ease__in__out"
                            placeholder="رمز عبور را وارد کنید ...">
                        </div>
                        <a href="#" class="link auth__flex auth__items__center auth__ease__in__out forgotk">
                          <i class="isax isax-lock-1"></i>
                          رمز عبور را فراموش کرده‌اید؟
                        </a>
                        <button type="submit" class="auth__page__btn auth__page__btn__success auth__w__fit auth__block">
                          ورود / ثبت نام </button>
                      </form>

                    </div>
                    <!-- End Tab Content Register -->
                  <?php elseif ($options['kaveh_login_type'] === 'option-2'): ?>
                    <!-- Start Tab Content Login -->
                    <div id="login" class="auth__tab__pane">
                      <img src="<?php echo KAVEH_TEMPLATE_URI . '/assets/images/user-avatar.svg'; ?>" alt="user"
                        width="105" height="105" class="auth__block auth__mx__auto">
                      <form class="smslogin" method="post" action="#">
                        <div class="auth__page__form__group position-relative">
                          <i class="isax isax-user iabs"></i>
                          <input id="phone" type="text" class="auth__page__form__control auth__ease__in__out"
                            placeholder=" شماره همراه را وارد کنید ...">
                        </div>
                        <br>
                        <button type="submit" class="auth__page__btn auth__page__btn__success auth__w__fit auth__block">
                          دریافت کد تایید </button>
                      </form>
                    </div>
                    <!-- End Tab Content Login -->
                    <!-- Start Tab Content Register -->
                    <div id="register" class="active auth__tab__pane">
                      <img src="<?php echo KAVEH_TEMPLATE_URI . '/assets/images/user-avatar.svg'; ?>" alt="user"
                        width="105" height="105" class="auth__block auth__mx__auto">
                      <form class="passlogin" method="post" action="#">
                        <div class="auth__page__form__group position-relative">
                          <i class="iconly iconly-Message iabs"></i>
                          <input type="text" id="email" class="auth__page__form__control auth__ease__in__out"
                            placeholder="موبایل یا ایمیل معتبر">
                        </div>
                        <div class="auth__page__form__group position-relative">
                          <i class="iconly iconly-Password iabs"></i>
                          <input type="password" id="password" class="auth__page__form__control auth__ease__in__out"
                            placeholder="رمز عبور را وارد کنید ...">
                        </div>
                        <a href="#" class="link auth__flex auth__items__center auth__ease__in__out forgotk">
                          <i class="isax isax-lock-1"></i>
                          رمز عبور را فراموش کرده‌اید؟
                        </a>
                        <button type="submit" class="auth__page__btn auth__page__btn__success auth__w__fit auth__block">
                          ورود / ثبت نام </button>
                      </form>

                    </div>
                    <!-- End Tab Content Register -->
                  <?php endif; ?>
                </div>
                <!-- End Tabs Contents -->
              </div>
              <!-- End Content -->
            </div>

          </div>

        </div>
      </div>
    </div>
  </div>
<?php endif; ?>