<?php
include_once "header.php";
?>

                <div class="idx4-header-icon idx4-stagger-1">
                    <i class="bi bi-box-arrow-in-right"></i>
                </div>
                <h2 class="idx4-title idx4-stagger-1"><?= __('front.login') ?></h2>
                <p class="idx4-subtitle idx4-stagger-2"><?= __('front.Use_your_credentials_to_login_into_account') ?></p>

                <ul class="nav idx4-nav-pills nav-fill mt-3 mb-4 idx4-stagger-2" role="tablist">
                    <li class="nav-item">
                        <a class="nav-link active" href="<?= base_url() ?>">
                            <i class="bi bi-box-arrow-in-right me-1"></i><?= __('front.login') ?>
                        </a>
                    </li>
                    <?php if(isset($store['registration_status']) && $store['registration_status']==0) {}
                    else if( ($vendor_marketstatus["marketvendorstatus"]==1 || $vendor_storestatus['storestatus']) && $store['registration_status']!=3 ) { ?>
                    <li class="nav-item">
                        <a class="nav-link" href="<?= base_url('register') ?>">
                            <i class="bi bi-person-plus me-1"></i><?= __('front.register') ?>
                        </a>
                    </li>
                    <?php } else if($store['registration_status']!=2){ ?>
                    <li class="nav-item">
                        <a class="nav-link" href="<?= base_url('register') ?>">
                            <i class="bi bi-person-plus me-1"></i><?= __('front.register') ?>
                        </a>
                    </li>
                    <?php } ?>
                </ul>

                <form id="login-form">
                    <div class="idx4-input-group form-floating mb-3 idx4-stagger-3">
                        <input required class="form-control idx4-input" name="username" id="idx4_username" placeholder="<?= __('front.username_email') ?>">
                        <label for="idx4_username"><i class="bi bi-envelope me-1"></i><?= __('front.username_email') ?></label>
                    </div>

                    <div class="idx4-input-group form-floating mb-3 idx4-stagger-4">
                        <input required type="password" class="form-control idx4-input" name="password" id="loginpassowrd" placeholder="<?= __('front.password') ?>">
                        <label for="loginpassowrd"><i class="bi bi-lock me-1"></i><?= __('front.password') ?></label>
                        <button type="button" class="toggle-password" tabindex="-1"><i class="bi bi-eye"></i></button>
                    </div>

                    <?= render_recaptcha_html('affiliate_login') ?>

                    <div class="d-flex align-items-center justify-content-between mb-3 idx4-stagger-5">
                        <button class="btn idx4-btn-primary py-3 px-4 flex-grow-1 me-3" id="login_button"><?= __('front.login') ?></button>
                        <a href="<?= base_url('forget-password') ?>" class="idx4-link text-nowrap"><?= __('front.forget_password') ?>?</a>
                    </div>

                    <div id="login-status-msg" class="idx4-stagger-5"></div>
                </form>

                <div class="idx4-trust-footer text-center idx4-stagger-6">
                    <small><i class="bi bi-shield-check me-1"></i><?= __('front.fast') ?> &amp; <?= __('front.trusted') ?></small>
                </div>

            </div>
        </div>
    </div>

    <div class="idx4-image-pane">
        <div class="idx4-deco idx4-deco-1"></div>
        <div class="idx4-deco idx4-deco-2"></div>
        <div class="idx4-art-brand">
            <h5><?= $title ?></h5>
            <p>&copy; <?= date('Y') ?></p>
        </div>
    </div>

<?php
include_once "footer.php";
?>
