<?php $__env->startSection('container_content'); ?>

<section class="box valign">
    <div class="container-fluid">
        <div class="row">
            <?php echo $__env->make('web.layouts.messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="col-lg-6">
                <div class="content">
                    <div class="dots wow zoomIn">
                        <span class="dot"></span>
                        <span class="dot active"></span>
                        <span class="dot"></span>
                    </div>
                    <h3 class="title wow fadeInUp">Verification</h3>
                    <div class="text-error wow fadeInDown">
                        Type the verification code sent to your phone.
                    </div>
                    <div class="form wow zoomIn">
                        <form action="<?php echo e(route('verification.verifyCode')); ?>" method="post">
                            <?php echo csrf_field(); ?>
                            <input name="email" type="text" readonly  class="bg-white" value="<?php echo e($email ?? ''); ?>" placeholder="# 000000000">
                            <input type="hidden" name="code" class="verification_code" value="">
                            <button type="submit" class="butn wow zoomIn gray verify_button"  disabled >Verify</button>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-lg-5 offset-lg-1 valign">
                <div class="text-center right wow zoomIn">
                    <div class="alert alert-success ajaxResponse d-none"></div>
                    <div class="countdown">
                        <span class="icon"><img src="<?php echo e(asset('assets/web/images/icons/stopwatch.svg')); ?>" alt=""></span>
                        <div id="one-countdown">1:00</div>
                    </div>
                    <div class="ver-code">
                        <div id="form-code">
                            <input class="code" type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
                            <input class="code" type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
                            <input class="code" type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />
                            <input class="code" type="text" maxLength="1" size="1" min="0" max="9" pattern="[0-9]{1}" />

                        </div>
                        <form class="resend_code_form" action="<?php echo e(route('user.resendCode')); ?>" method="post">
                            <?php echo csrf_field(); ?>
                            <input name="email" type="hidden" value="<?php echo e($email ?? ''); ?>">
                        </form>
                        <span class="resend"><a data-type="password" class="resend_code" href="<?php echo e(route('user.resendCode')); ?>">Resend code ?</a></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('container_js'); ?>
    <script>
        $(document).ready(function () {

            let verify_button = $('.verify_button'),
                verification_code = $('.verification_code');

            verify_button.attr('disabled', true).addClass("gray");

            verify_button.click(function () {
                if (verification_code.val() === ''){
                    return false;
                }
            });


            let error = [];
            $('.code').keyup(function() {

                if ($(this).val().length === 1){
                    $(this).next().focus();
                }

                let verification_code = '';

                $('.code').each(function () {

                    if ($(this).val().length === 0){
                        error.push(true);
                    }
                    verification_code += $(this).val();
                });

                if (error.length === 0){
                    $('.verify_button').attr('disabled', false).removeClass("gray");
                } else {
                    $('.verify_button').attr('disabled', true).addClass("gray");
                }
                error = [];

                $('.verification_code').val(verification_code);
            });

        })
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('web.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\wamp64\www\gam3iea\resources\views/web/users/forget_password_code_form.blade.php ENDPATH**/ ?>