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


 <section class="inner_header">
        <div class="container">
            <div class="top">
                <a href="<?php echo e(url(getCurrentLocale().'/')); ?>"><?php echo e(__('web.home')); ?> </a>
                <span><?php echo e(__('web.activatecode')); ?></span>
            </div>
            <h2><?php echo e(__('web.activatecode')); ?></h2>
        </div>
    </section>
    <main>
        <!-- -------------- register --------------- -->
        <section class="register">
            <div class="row no-gutters">
                <div class="col-lg-6">
                    <div class="img w-100">
                        <img src="<?php echo e(url('')); ?>/assets/web/images/login3.svg" alt="">
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="l_side valign">
                        <div class="cont w-100 text-center">
                            <h4><?php echo e(__('web.activatecode')); ?></h4>
                            <form class="form-row" method="post" action="<?php echo e(url(getCurrentLocale().'/activation')); ?>">
                                <?php echo csrf_field(); ?>
                                <div class="col-12">
                                    
                                    <p><?php echo e($desc); ?></p>
                                    <p class="sub_color"><?php echo e($data); ?></p>
                                </div>
                                <div class="code_input form-group col-12 text-center mt-4">
                                    <label><?php echo e(__('web.code')); ?></label>
                                    <br>
                                    <input name='fifth' required type="text" maxlength="1">
                                    <input name='fourth' required type="text" maxlength="1">
                                    <input name='third' required type="text" maxlength="1">
                                    <input name='second' required type="text" maxlength="1">
                                    <input name='first' required type="text" maxlength="1">
                                </div>
                                <div class="text-center d-block w-100 main_color mt-4">
                                    <strong id="count_down" class="count_down"></strong>
                                </div>
                              <div class="form-group col-12 text-center">
                                    <!--  <a href="<?php echo e(url(getCurrentLocale().'/activate')); ?>" class="border-bottom mb-4">إعادة إرسال</a>-->
                                    <button type="submit" class="butn main_bg"><span><?php echo e(__('web.send')); ?></span></button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- -------------- inner_subscribe --------------- -->
          <section class="inner_subscribe">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="r_side">
                            <div class="icons">
                                <i class="fas fa-location-arrow"></i>
                            </div>
                            <div class="info">
                                <h6><?php echo e(__('web.sub_mail')); ?></h6>
                                <p><?php echo e(__('web.sub_mail_desc')); ?> </p>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="l_side">
                            <form onsubmit="subscribedata(this)" method="post" action="<?php echo e(url(getCurrentLocale().'/subcribe')); ?>" class="form-row">
                                <?php echo csrf_field(); ?>
                                <div class="form-group col-12">
                                    <input type="email" name="email"  placeholder="<?php echo e(__('web.email')); ?>">
                                    <button><?php echo e(__('web.subscribe')); ?></button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
           
                <div class="modal fade modal_login" id="mailsuccess" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/checked.svg" alt="">
                        </div>
                        <h4><?php echo e(__('web.success')); ?> </h4>
                    </div>
                </div>
            </div>
        </div>
        
         <div class="modal fade modal_login" id="mailfailed" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content">
                    <div class="modal-body text-center">
                        <div class="icon">
                            <img src="<?php echo e(url('')); ?>/assets/web/images/icons/alert.svg" alt="">
                        </div>
                        <div id="mailerrors" class="alert alert-danger">
                             
                        </div>
                       
                        
                    </div>
                </div>
            </div>
        </div>
        
        </section>




    </main>
    
<?php $__env->startPush('js'); ?>
<script>
 function subscribedata(elem) {
    event.preventDefault();
   
         let action = $(elem).attr('action');
       
       let urls = action;
       
       let dataform = new FormData( $(elem)[0]);
        
     
      $.ajax({
          url : urls,
          type: 'POST',              
          data: dataform,
          contentType: false, 
          processData: false, 
          success:function(data)
          {
            
            $("#mailsuccess").modal('show');
               }
          ,error: function (data) {
              
              $('#mailerrors').html('');
   $.each(data.responseJSON.errors, function(key,value) {
      
     $('#mailerrors').append('<h4 >'+value+'</h4>');
     
 }); 
 
  $("#mailfailed").modal('show');
 
}
        })


}
</script>

<script>
   
    var timeleft = 60;
        var downloadTimer = setInterval(function() {
            if (timeleft <= 0) {
                clearInterval(downloadTimer);
                document.getElementById("count_down").innerHTML = "<a href='"+<?php echo json_encode(url(getCurrentLocale().'/activate')); ?>+"'>"+<?php echo json_encode(__('web.resend')); ?>+" </a>";
            } else {
                document.getElementById("count_down").innerHTML = ""+<?php echo json_encode(__('web.timeleft')); ?>+" " + timeleft + " "+<?php echo json_encode(__('web.second')); ?>+"  ";
            }
            timeleft -= 1;
        }, 1000);
</script>
<?php $__env->stopPush(); ?>
    <?php $__env->stopSection(); ?>
<?php echo $__env->make('web.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/hanqr/resources/views/web/pages/auth/activate.blade.php ENDPATH**/ ?>